mirror of
https://github.com/vsariola/sointu.git
synced 2025-05-28 03:10:24 -04:00
feat: separate unit type from comment (now in quotes) in target dropdowns
This commit is contained in:
parent
56f5297188
commit
4e81fcc10f
@ -340,7 +340,11 @@ func (p ParameterStyle) Layout(gtx C) D {
|
|||||||
unitItems = make([]MenuItem, len(units))
|
unitItems = make([]MenuItem, len(units))
|
||||||
for j, unit := range units {
|
for j, unit := range units {
|
||||||
id := unit.ID
|
id := unit.ID
|
||||||
unitItems[j].Text = fmt.Sprintf("%d: %s %s", j, unit.Type, unit.Comment)
|
text := unit.Type
|
||||||
|
if unit.Comment != "" {
|
||||||
|
text = fmt.Sprintf("%s \"%s\"", text, unit.Comment)
|
||||||
|
}
|
||||||
|
unitItems[j].Text = fmt.Sprintf("%d: %s", j, text)
|
||||||
unitItems[j].IconBytes = icons.NavigationChevronRight
|
unitItems[j].IconBytes = icons.NavigationChevronRight
|
||||||
unitItems[j].Doer = tracker.Allow(func() {
|
unitItems[j].Doer = tracker.Allow(func() {
|
||||||
tracker.Int{IntData: p.w.Parameter}.Set(id)
|
tracker.Int{IntData: p.w.Parameter}.Set(id)
|
||||||
|
Loading…
Reference in New Issue
Block a user