mirror of
https://github.com/vsariola/sointu.git
synced 2025-07-21 22:44:50 -04:00
refactor(tracker/gioui): avoid heap escapes in NumericUpDown
This commit is contained in:
parent
db2ccf977d
commit
31007515b5
@ -28,8 +28,8 @@ var canQuit = true // set to false in init() if plugin tag is enabled
|
||||
type (
|
||||
Tracker struct {
|
||||
Theme *Theme
|
||||
OctaveNumberInput *NumericUpDown
|
||||
InstrumentVoices *NumericUpDown
|
||||
OctaveNumberInput *NumericUpDownState
|
||||
InstrumentVoices *NumericUpDownState
|
||||
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: NewNumericUpDown(),
|
||||
InstrumentVoices: NewNumericUpDown(),
|
||||
OctaveNumberInput: NewNumericUpDownState(),
|
||||
InstrumentVoices: NewNumericUpDownState(),
|
||||
|
||||
TopHorizontalSplit: &Split{Ratio: -.5, MinSize1: 180, MinSize2: 180},
|
||||
BottomHorizontalSplit: &Split{Ratio: -.6, MinSize1: 180, MinSize2: 180},
|
||||
|
Reference in New Issue
Block a user