mirror of
https://github.com/vsariola/sointu.git
synced 2025-05-28 03:10:24 -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]
|
## [Unreleased]
|
||||||
### Added
|
### 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
|
- The filter unit frequency parameter is displayed in Hz, corresponding roughly
|
||||||
to the resonant frequency of the filter ([#158][i158])
|
to the resonant frequency of the filter ([#158][i158])
|
||||||
- Include version info in the binaries, as given be `git describe`. This version
|
- 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
|
[i148]: https://github.com/vsariola/sointu/issues/148
|
||||||
[i149]: https://github.com/vsariola/sointu/issues/149
|
[i149]: https://github.com/vsariola/sointu/issues/149
|
||||||
[i150]: https://github.com/vsariola/sointu/issues/150
|
[i150]: https://github.com/vsariola/sointu/issues/150
|
||||||
|
[i154]: https://github.com/vsariola/sointu/issues/154
|
||||||
[i158]: https://github.com/vsariola/sointu/issues/158
|
[i158]: https://github.com/vsariola/sointu/issues/158
|
||||||
[i162]: https://github.com/vsariola/sointu/issues/162
|
[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 {
|
element := func(gtx C, i int) D {
|
||||||
gtx.Constraints.Min.Y = gtx.Dp(unit.Dp(36))
|
gtx.Constraints.Min.Y = gtx.Dp(unit.Dp(36))
|
||||||
gtx.Constraints.Min.X = gtx.Dp(unit.Dp(30))
|
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}
|
grabhandle := LabelStyle{Text: strconv.Itoa(i + 1), ShadeColor: black, Color: mediumEmphasisTextColor, FontSize: unit.Sp(10), Alignment: layout.Center, Shaper: t.Theme.Shaper}
|
||||||
if i == ie.instrumentDragList.TrackerList.Selected() {
|
|
||||||
grabhandle.Text = ":::"
|
|
||||||
}
|
|
||||||
label := func(gtx C) D {
|
label := func(gtx C) D {
|
||||||
name, level, ok := (*tracker.Instruments)(t.Model).Item(i)
|
name, level, ok := (*tracker.Instruments)(t.Model).Item(i)
|
||||||
if !ok {
|
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}
|
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.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,
|
return layout.Flex{Axis: layout.Vertical, Alignment: layout.Middle}.Layout(gtx,
|
||||||
layout.Rigid(grabhandle.Layout),
|
layout.Rigid(grabhandle.Layout),
|
||||||
layout.Rigid(label),
|
layout.Rigid(label),
|
||||||
|
Loading…
Reference in New Issue
Block a user