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:
Elias Naur
2023-10-06 18:33:56 -05:00
parent 650ccea28d
commit 1686874d07
7 changed files with 31 additions and 31 deletions
+3 -3
View File
@@ -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