mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-02 07:57:29 +00:00
ui/gesture: rename Scroller.Update to Scroller.Scroll
Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -133,7 +133,7 @@ func (s *Scroll) Dragging() bool {
|
||||
return s.dragging
|
||||
}
|
||||
|
||||
func (s *Scroll) Update(cfg *ui.Config, q input.Events, axis Axis) int {
|
||||
func (s *Scroll) Scroll(cfg *ui.Config, q input.Events, axis Axis) int {
|
||||
if s.axis != axis {
|
||||
s.axis = axis
|
||||
return 0
|
||||
|
||||
+1
-1
@@ -70,7 +70,7 @@ func (l *List) Dragging() bool {
|
||||
|
||||
func (l *List) update() {
|
||||
l.Distance = 0
|
||||
d := l.scroll.Update(l.Config, l.Inputs, gesture.Axis(l.Axis))
|
||||
d := l.scroll.Scroll(l.Config, l.Inputs, gesture.Axis(l.Axis))
|
||||
if l.Invert {
|
||||
d = -d
|
||||
}
|
||||
|
||||
+1
-1
@@ -80,7 +80,7 @@ func (e *Editor) Next() (EditorEvent, bool) {
|
||||
axis = gesture.Vertical
|
||||
smin, smax = sbounds.Min.Y, sbounds.Max.Y
|
||||
}
|
||||
sdist := e.scroller.Update(e.Config, e.Inputs, axis)
|
||||
sdist := e.scroller.Scroll(e.Config, e.Inputs, axis)
|
||||
var soff int
|
||||
if e.SingleLine {
|
||||
e.scrollOff.X += sdist
|
||||
|
||||
Reference in New Issue
Block a user