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:
Elias Naur
2023-11-25 14:52:30 -06:00
parent 6dcebf205f
commit ab9f42c820
7 changed files with 13 additions and 29 deletions
+1 -1
View File
@@ -49,7 +49,7 @@ func TestSelectableMove(t *testing.T) {
// Layout once to populate e.lines and get focus.
s := new(Selectable)
s.Focus(gtx)
gtx.Execute(key.FocusCmd{Tag: s})
s.SetText(str)
// Set up selection so the Selectable filters for all 4 directional keys.
s.Layout(gtx, cache, font.Font{}, fontSize, op.CallOp{}, op.CallOp{})