mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-06 09:55:40 +00:00
all: rename io/event.Key to Tag
Key had an unfortunate association with keyboard input.
This is an API change. The following rewrites were run to fixup
Gio code:
$ gofmt -r 'pointer.InputOp{Key:a} -> pointer.InputOp{Tag:a}' -w .
$ gofmt -r 'pointer.InputOp{Key:a, Grab:b} -> pointer.InputOp{Tag:a, Grab:b}' -w .
$ gofmt -r 'key.InputOp{Key:a} -> key.InputOp{Tag:a}' -w .
$ gofmt -r 'key.InputOp{Key:a, Focus:b} -> key.InputOp{Tag:a, Focus:b}' -w .
$ gofmt -r 'event.Key -> event.Tag' -w .
Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
+1
-1
@@ -296,7 +296,7 @@ func (e *Editor) layout(gtx *layout.Context) {
|
||||
e.shapes = append(e.shapes, line{off, path})
|
||||
}
|
||||
|
||||
key.InputOp{Key: &e.eventKey, Focus: e.requestFocus}.Add(gtx.Ops)
|
||||
key.InputOp{Tag: &e.eventKey, Focus: e.requestFocus}.Add(gtx.Ops)
|
||||
e.requestFocus = false
|
||||
pointerPadding := gtx.Px(unit.Dp(4))
|
||||
r := image.Rectangle{Max: e.viewSize}
|
||||
|
||||
Reference in New Issue
Block a user