fix(tracker/gioui): using keys to choose Unit Type and tab ordering

This commit is contained in:
5684185+vsariola@users.noreply.github.com
2025-06-26 00:33:18 +03:00
parent 192909328c
commit 18d7848367
4 changed files with 117 additions and 94 deletions

View File

@ -471,15 +471,12 @@ func (ul *UnitList) update(gtx C, t *Tracker) {
key.Filter{Focus: ul.dragList, Name: key.NameEnter, Optional: key.ModCtrl},
key.Filter{Focus: ul.dragList, Name: key.NameReturn, Optional: key.ModCtrl},
key.Filter{Focus: ul.dragList, Name: key.NameDeleteBackward},
key.Filter{Focus: ul.dragList, Name: key.NameEscape},
)
if !ok {
break
}
if e, ok := event.(key.Event); ok && e.State == key.Press {
switch e.Name {
case key.NameEscape:
t.PatchPanel.instrList.instrumentDragList.Focus()
case key.NameRightArrow:
t.PatchPanel.unitEditor.sliderList.Focus()
case key.NameDeleteBackward:
@ -496,5 +493,5 @@ func (ul *UnitList) update(gtx C, t *Tracker) {
}
func (ul *UnitList) Tags(curLevel int, yield TagYieldFunc) bool {
return yield(curLevel, ul.dragList)
return yield(curLevel, ul.dragList) && yield(curLevel+1, &ul.searchEditor.widgetEditor)
}