feat(tracker/gioui): new tab order logic and refactor instrument editor

This commit is contained in:
5684185+vsariola@users.noreply.github.com
2025-06-25 12:53:57 +03:00
parent d276f52942
commit 08c36ed462
13 changed files with 741 additions and 639 deletions

View File

@ -100,12 +100,12 @@ func (oe *OrderEditor) Layout(gtx C, t *Tracker) D {
point := tracker.Point{X: x, Y: y}
if selection.Contains(point) {
color = t.Theme.Selection.Inactive
if oe.scrollTable.Focused(gtx) {
if gtx.Focused(oe.scrollTable) {
color = t.Theme.Selection.Active
}
if point == oe.scrollTable.Table.Cursor() {
color = t.Theme.Cursor.Inactive
if oe.scrollTable.Focused(gtx) {
if gtx.Focused(oe.scrollTable) {
color = t.Theme.Cursor.Active
}
}
@ -200,6 +200,10 @@ func (oe *OrderEditor) command(t *Tracker, e key.Event) {
}
}
func (t *OrderEditor) Tags(level int, yield TagYieldFunc) bool {
return yield(level+1, t.scrollTable.RowTitleList) && yield(level+1, t.scrollTable.ColTitleList) && yield(level, t.scrollTable)
}
func patternIndexToString(index int) string {
if index < 0 {
return ""