mirror of
https://github.com/vsariola/sointu.git
synced 2025-07-18 04:54:27 -04:00
refactor(tracker): move instrument related stuff from layout.go to instruments.go
the code related to handling instrument button actions definitely should be in instruments.go, not layout.go
This commit is contained in:
@ -16,7 +16,6 @@ func (t *Tracker) Layout(gtx layout.Context) {
|
||||
t.VerticalSplit.Layout(gtx,
|
||||
t.layoutTop,
|
||||
t.layoutBottom)
|
||||
t.updateInstrumentScroll()
|
||||
}
|
||||
|
||||
func (t *Tracker) layoutBottom(gtx layout.Context) layout.Dimensions {
|
||||
@ -31,13 +30,8 @@ func (t *Tracker) layoutBottom(gtx layout.Context) layout.Dimensions {
|
||||
}
|
||||
|
||||
func (t *Tracker) layoutTop(gtx layout.Context) layout.Dimensions {
|
||||
for t.NewInstrumentBtn.Clicked() {
|
||||
t.AddInstrument()
|
||||
}
|
||||
|
||||
return t.TopHorizontalSplit.Layout(gtx,
|
||||
t.layoutSongPanel,
|
||||
t.layoutInstruments,
|
||||
)
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user