fix(tracker/gioui): show muted instruments in different style

This commit is contained in:
5684185+vsariola@users.noreply.github.com
2025-06-16 18:35:06 +03:00
parent c023dc08b8
commit 1eea263dc9
2 changed files with 10 additions and 7 deletions

View File

@ -294,13 +294,12 @@ func (ie *InstrumentEditor) layoutInstrumentList(gtx C, t *Tracker) D {
labelStyle := Label(t.Theme, &t.Theme.InstrumentEditor.InstrumentList.Number, "")
return layout.Center.Layout(gtx, labelStyle.Layout)
}
k := byte(255 - level*127)
color := color.NRGBA{R: 255, G: k, B: 255, A: 255}
s := t.Theme.InstrumentEditor.InstrumentList.Name
if mute {
s = t.Theme.InstrumentEditor.InstrumentList.NameMuted
s := t.Theme.InstrumentEditor.InstrumentList.NameMuted
if !mute {
s = t.Theme.InstrumentEditor.InstrumentList.Name
k := byte(255 - level*127)
s.Color = color.NRGBA{R: 255, G: k, B: 255, A: 255}
}
s.Color = color
if i == ie.instrumentDragList.TrackerList.Selected() {
ie.nameEditor.SetText(name)
for ie.nameEditor.Submitted(gtx) || ie.nameEditor.Cancelled(gtx) {

View File

@ -135,7 +135,11 @@ instrumenteditor:
instrumentlist:
number: { textsize: 10, color: *mediumemphasis }
name: { textsize: 12, color: *white, hintcolor: *disabled }
namemuted: { textsize: 12, color: *disabled, hintcolor: *disabled }
namemuted:
textsize: 12
color: *disabled
hintcolor: *disabled
font: { style: 1 }
scrollbar: { width: 6, color: *scrollbarcolor }
unitlist:
name: { textsize: 12, color: *white, hintcolor: *disabled }