mirror of
https://github.com/vsariola/sointu.git
synced 2025-07-19 05:24:48 -04:00
feat: focus search editor after "add unit"
This commit is contained in:
@ -13,8 +13,9 @@ type (
|
||||
// application while editing (particularly: to prevent triggering notes
|
||||
// while editing).
|
||||
Editor struct {
|
||||
Editor widget.Editor
|
||||
filters []event.Filter
|
||||
Editor widget.Editor
|
||||
filters []event.Filter
|
||||
requestFocus bool
|
||||
}
|
||||
|
||||
EditorStyle material.EditorStyle
|
||||
@ -76,6 +77,10 @@ func (e *Editor) Cancelled(gtx C) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func (e *Editor) Focus() {
|
||||
e.requestFocus = true
|
||||
}
|
||||
|
||||
func (e *EditorStyle) Layout(gtx C) D {
|
||||
return material.EditorStyle(*e).Layout(gtx)
|
||||
}
|
||||
|
Reference in New Issue
Block a user