refactor(tracker/gioui): bind tracker.Int to NumericUpDown on Layout

This commit is contained in:
5684185+vsariola@users.noreply.github.com
2025-06-21 11:45:31 +03:00
parent 289bfb0605
commit beef8fe1e0
8 changed files with 136 additions and 153 deletions

View File

@ -28,8 +28,8 @@ var canQuit = true // set to false in init() if plugin tag is enabled
type (
Tracker struct {
Theme *Theme
OctaveNumberInput *NumberInput
InstrumentVoices *NumberInput
OctaveNumberInput *NumericUpDown
InstrumentVoices *NumericUpDown
TopHorizontalSplit *Split
BottomHorizontalSplit *Split
VerticalSplit *Split
@ -70,8 +70,8 @@ var ZoomFactors = []float32{.25, 1. / 3, .5, 2. / 3, .75, .8, 1, 1.1, 1.25, 1.5,
func NewTracker(model *tracker.Model) *Tracker {
t := &Tracker{
OctaveNumberInput: NewNumberInput(model.Octave()),
InstrumentVoices: NewNumberInput(model.InstrumentVoices()),
OctaveNumberInput: NewNumericUpDown(),
InstrumentVoices: NewNumericUpDown(),
TopHorizontalSplit: &Split{Ratio: -.5, MinSize1: 180, MinSize2: 180},
BottomHorizontalSplit: &Split{Ratio: -.6, MinSize1: 180, MinSize2: 180},