mirror of
https://github.com/vsariola/sointu.git
synced 2025-05-27 19:00:25 -04:00
feat(tracker/gioui): label identifying instrument MIDI channel
Closes #154.
This commit is contained in:
parent
a94703deea
commit
b4a63ce362
@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||
|
||||
## [Unreleased]
|
||||
### Added
|
||||
- A small number above the instrument name identifies the MIDI channel /
|
||||
instrument number, with numbering starting from 1 ([#154][i154])
|
||||
- The filter unit frequency parameter is displayed in Hz, corresponding roughly
|
||||
to the resonant frequency of the filter ([#158][i158])
|
||||
- Include version info in the binaries, as given be `git describe`. This version
|
||||
@ -235,5 +237,6 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||
[i148]: https://github.com/vsariola/sointu/issues/148
|
||||
[i149]: https://github.com/vsariola/sointu/issues/149
|
||||
[i150]: https://github.com/vsariola/sointu/issues/150
|
||||
[i154]: https://github.com/vsariola/sointu/issues/154
|
||||
[i158]: https://github.com/vsariola/sointu/issues/158
|
||||
[i162]: https://github.com/vsariola/sointu/issues/162
|
||||
|
@ -258,10 +258,7 @@ func (ie *InstrumentEditor) layoutInstrumentList(gtx C, t *Tracker) D {
|
||||
element := func(gtx C, i int) D {
|
||||
gtx.Constraints.Min.Y = gtx.Dp(unit.Dp(36))
|
||||
gtx.Constraints.Min.X = gtx.Dp(unit.Dp(30))
|
||||
grabhandle := LabelStyle{Text: "", ShadeColor: black, Color: white, FontSize: unit.Sp(10), Alignment: layout.Center, Shaper: t.Theme.Shaper}
|
||||
if i == ie.instrumentDragList.TrackerList.Selected() {
|
||||
grabhandle.Text = ":::"
|
||||
}
|
||||
grabhandle := LabelStyle{Text: strconv.Itoa(i + 1), ShadeColor: black, Color: mediumEmphasisTextColor, FontSize: unit.Sp(10), Alignment: layout.Center, Shaper: t.Theme.Shaper}
|
||||
label := func(gtx C) D {
|
||||
name, level, ok := (*tracker.Instruments)(t.Model).Item(i)
|
||||
if !ok {
|
||||
@ -312,7 +309,7 @@ func (ie *InstrumentEditor) layoutInstrumentList(gtx C, t *Tracker) D {
|
||||
labelStyle := LabelStyle{Text: name, ShadeColor: black, Color: color, Font: labelDefaultFont, FontSize: unit.Sp(12), Shaper: t.Theme.Shaper}
|
||||
return layout.Center.Layout(gtx, labelStyle.Layout)
|
||||
}
|
||||
return layout.Inset{Left: unit.Dp(6), Right: unit.Dp(6)}.Layout(gtx, func(gtx C) D {
|
||||
return layout.Inset{Left: unit.Dp(6), Right: unit.Dp(6), Top: unit.Dp(4)}.Layout(gtx, func(gtx C) D {
|
||||
return layout.Flex{Axis: layout.Vertical, Alignment: layout.Middle}.Layout(gtx,
|
||||
layout.Rigid(grabhandle.Layout),
|
||||
layout.Rigid(label),
|
||||
|
Loading…
Reference in New Issue
Block a user