mirror of
https://github.com/vsariola/sointu.git
synced 2025-07-20 22:14:35 -04:00
fix(tracker/gioui): show muted instruments in different style
This commit is contained in:
parent
c023dc08b8
commit
1eea263dc9
@ -294,13 +294,12 @@ func (ie *InstrumentEditor) layoutInstrumentList(gtx C, t *Tracker) D {
|
|||||||
labelStyle := Label(t.Theme, &t.Theme.InstrumentEditor.InstrumentList.Number, "")
|
labelStyle := Label(t.Theme, &t.Theme.InstrumentEditor.InstrumentList.Number, "")
|
||||||
return layout.Center.Layout(gtx, labelStyle.Layout)
|
return layout.Center.Layout(gtx, labelStyle.Layout)
|
||||||
}
|
}
|
||||||
k := byte(255 - level*127)
|
s := t.Theme.InstrumentEditor.InstrumentList.NameMuted
|
||||||
color := color.NRGBA{R: 255, G: k, B: 255, A: 255}
|
if !mute {
|
||||||
s := t.Theme.InstrumentEditor.InstrumentList.Name
|
s = t.Theme.InstrumentEditor.InstrumentList.Name
|
||||||
if mute {
|
k := byte(255 - level*127)
|
||||||
s = t.Theme.InstrumentEditor.InstrumentList.NameMuted
|
s.Color = color.NRGBA{R: 255, G: k, B: 255, A: 255}
|
||||||
}
|
}
|
||||||
s.Color = color
|
|
||||||
if i == ie.instrumentDragList.TrackerList.Selected() {
|
if i == ie.instrumentDragList.TrackerList.Selected() {
|
||||||
ie.nameEditor.SetText(name)
|
ie.nameEditor.SetText(name)
|
||||||
for ie.nameEditor.Submitted(gtx) || ie.nameEditor.Cancelled(gtx) {
|
for ie.nameEditor.Submitted(gtx) || ie.nameEditor.Cancelled(gtx) {
|
||||||
|
@ -135,7 +135,11 @@ instrumenteditor:
|
|||||||
instrumentlist:
|
instrumentlist:
|
||||||
number: { textsize: 10, color: *mediumemphasis }
|
number: { textsize: 10, color: *mediumemphasis }
|
||||||
name: { textsize: 12, color: *white, hintcolor: *disabled }
|
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 }
|
scrollbar: { width: 6, color: *scrollbarcolor }
|
||||||
unitlist:
|
unitlist:
|
||||||
name: { textsize: 12, color: *white, hintcolor: *disabled }
|
name: { textsize: 12, color: *white, hintcolor: *disabled }
|
||||||
|
Reference in New Issue
Block a user