widget: [API] re-implement Selectable.Focus in terms of commands

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2023-10-20 20:58:36 -05:00
parent 8334d2abb4
commit 9de80749e1
2 changed files with 13 additions and 18 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()
s.Focus(gtx)
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{})