Remove scroll debug statements. Add one extra element to browser listview
so that we have a partial item displayed at the bottom and not a blank space.
This commit is contained in:
parent
6709f52e0f
commit
dc80c8a8e8
|
|
@ -176,7 +176,8 @@ func computeVisibleEntries(state *BrowserState) []ui.ListItem {
|
|||
}
|
||||
|
||||
startIndex := state.GetScrollIndex()
|
||||
endIndex := startIndex + state.VisibleCount
|
||||
// show one past the "visible count" for a partial view of the next item
|
||||
endIndex := startIndex + state.VisibleCount + 1
|
||||
if endIndex > state.TotalEntries {
|
||||
endIndex = state.TotalEntries
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ package ui
|
|||
import (
|
||||
"bytes"
|
||||
"embed"
|
||||
"fmt"
|
||||
"image"
|
||||
"image/color"
|
||||
_ "image/png"
|
||||
|
|
@ -200,7 +199,6 @@ func (r *Renderer) CheckGestures(q input.Source, m unit.Metric) []InputEvent {
|
|||
delta := reg.scroll.Update(m, q, time.Now(), gesture.Vertical,
|
||||
pointer.ScrollRange{}, pointer.ScrollRange{Min: -(1<<30), Max: 1<<30})
|
||||
if delta != 0 {
|
||||
fmt.Printf("Scroll detected: %v\n", delta)
|
||||
events = append(events, InputEvent{
|
||||
Handler: reg.handler,
|
||||
Data: delta,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user