mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-01 07:35:40 +00:00
widget,gesture: fade out cancelled inkwells
While here, adjust inkwell sizes to match gtx.Constraints.Min. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -147,6 +147,8 @@ func (c *Click) Events(q event.Queue) []ClickEvent {
|
||||
}
|
||||
c.clickedAt = e.Time
|
||||
events = append(events, ClickEvent{Type: TypeClick, Position: e.Position, Source: e.Source, Modifiers: e.Modifiers, NumClicks: c.clicks})
|
||||
} else {
|
||||
events = append(events, ClickEvent{Type: TypeCancel})
|
||||
}
|
||||
case pointer.Cancel:
|
||||
wasPressed := c.state == StatePressed
|
||||
@@ -304,6 +306,8 @@ func (ct ClickType) String() string {
|
||||
return "TypePress"
|
||||
case TypeClick:
|
||||
return "TypeClick"
|
||||
case TypeCancel:
|
||||
return "TypeCancel"
|
||||
default:
|
||||
panic("invalid ClickType")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user