mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-01 07:35:40 +00:00
gesture: [API] rename ClickType to ClickKind
"Kind" is the Go idiomatic name for distinguishing structs outside of the type system. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
+3
-3
@@ -74,12 +74,12 @@ func (e *Enum) Layout(gtx layout.Context, k string, content layout.Widget) layou
|
||||
}
|
||||
clk := &state.click
|
||||
for _, ev := range clk.Events(gtx) {
|
||||
switch ev.Type {
|
||||
case gesture.TypePress:
|
||||
switch ev.Kind {
|
||||
case gesture.KindPress:
|
||||
if ev.Source == pointer.Mouse {
|
||||
key.FocusOp{Tag: &state.tag}.Add(gtx.Ops)
|
||||
}
|
||||
case gesture.TypeClick:
|
||||
case gesture.KindClick:
|
||||
if state.key != e.Value {
|
||||
e.Value = state.key
|
||||
e.changed = true
|
||||
|
||||
Reference in New Issue
Block a user