mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-01 07:35:40 +00:00
gesture: [API] rename gesture state update methods to Update
Change the gesture state update methods to align with the convention. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
+3
-3
@@ -61,7 +61,7 @@ func (s *Scrollbar) Layout(gtx layout.Context, axis layout.Axis, viewportStart,
|
||||
}
|
||||
|
||||
// Jump to a click in the track.
|
||||
for _, event := range s.track.Events(gtx) {
|
||||
for _, event := range s.track.Update(gtx) {
|
||||
if event.Kind != gesture.KindClick ||
|
||||
event.Modifiers != key.Modifiers(0) ||
|
||||
event.NumClicks > 1 {
|
||||
@@ -80,7 +80,7 @@ func (s *Scrollbar) Layout(gtx layout.Context, axis layout.Axis, viewportStart,
|
||||
}
|
||||
|
||||
// Offset to account for any drags.
|
||||
for _, event := range s.drag.Events(gtx.Metric, gtx, gesture.Axis(axis)) {
|
||||
for _, event := range s.drag.Update(gtx.Metric, gtx, gesture.Axis(axis)) {
|
||||
switch event.Kind {
|
||||
case pointer.Drag:
|
||||
case pointer.Release, pointer.Cancel:
|
||||
@@ -136,7 +136,7 @@ func (s *Scrollbar) Layout(gtx layout.Context, axis layout.Axis, viewportStart,
|
||||
|
||||
// Process events from the indicator so that hover is
|
||||
// detected properly.
|
||||
_ = s.indicator.Events(gtx)
|
||||
_ = s.indicator.Update(gtx)
|
||||
|
||||
return layout.Dimensions{}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user