mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-01 15:45:38 +00:00
ui/text: add Editor.Focus method
Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -160,6 +160,10 @@ func (e *Editor) caretWidth() fixed.Int26_6 {
|
||||
return fixed.Int26_6(oneDp * 64)
|
||||
}
|
||||
|
||||
func (e *Editor) Focus() {
|
||||
e.requestFocus = true
|
||||
}
|
||||
|
||||
func (e *Editor) Layout(ops *ui.Ops, cs layout.Constraints) layout.Dimens {
|
||||
for {
|
||||
if _, ok := e.Next(); !ok {
|
||||
|
||||
Reference in New Issue
Block a user