mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-04 00:45:35 +00:00
widget: [API] replace Focus methods with explicit FocusCmds
Now that widgets by convention may be focused by issuing FocusCmd directly, remove the now redundant Focus methods on Clickable, Editor, Selectable. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -38,7 +38,7 @@ func TestClickable(t *testing.T) {
|
||||
r.Frame(gtx.Ops)
|
||||
}
|
||||
// frame: request focus for button 1
|
||||
b1.Focus(gtx)
|
||||
gtx.Execute(key.FocusCmd{Tag: &b1})
|
||||
frame()
|
||||
// frame: gain focus for button 1
|
||||
frame()
|
||||
@@ -78,7 +78,7 @@ func TestClickable(t *testing.T) {
|
||||
t.Error("button 1 got clicked, even if it only got return press")
|
||||
}
|
||||
// frame: request focus for button 2
|
||||
b2.Focus(gtx)
|
||||
gtx.Execute(key.FocusCmd{Tag: &b2})
|
||||
frame()
|
||||
// frame: gain focus for button 2
|
||||
frame()
|
||||
|
||||
Reference in New Issue
Block a user