From 1eea263dc9c399c8734f2306dfa44dbf1179ae4f Mon Sep 17 00:00:00 2001 From: "5684185+vsariola@users.noreply.github.com" <5684185+vsariola@users.noreply.github.com> Date: Mon, 16 Jun 2025 18:35:06 +0300 Subject: [PATCH] fix(tracker/gioui): show muted instruments in different style --- tracker/gioui/instrument_editor.go | 11 +++++------ tracker/gioui/theme.yml | 6 +++++- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/tracker/gioui/instrument_editor.go b/tracker/gioui/instrument_editor.go index beb8d8c..523728d 100644 --- a/tracker/gioui/instrument_editor.go +++ b/tracker/gioui/instrument_editor.go @@ -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) { diff --git a/tracker/gioui/theme.yml b/tracker/gioui/theme.yml index f5bcf36..5e23d39 100644 --- a/tracker/gioui/theme.yml +++ b/tracker/gioui/theme.yml @@ -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 }