mirror of
https://github.com/vsariola/sointu.git
synced 2025-06-04 01:28:45 -04:00
parent
712a4c927b
commit
a470452e99
@ -49,6 +49,10 @@ func (t *Tracker) layoutSongButtons(gtx C) D {
|
||||
}
|
||||
}
|
||||
|
||||
for t.PasteBtn.Clicked() {
|
||||
clipboard.ReadOp{Tag: t.PasteBtn}.Add(gtx.Ops)
|
||||
}
|
||||
|
||||
newBtnStyle := material.IconButton(t.Theme, t.NewSongFileBtn, widgetForIcon(icons.ContentClear))
|
||||
newBtnStyle.Background = transparent
|
||||
newBtnStyle.Inset = layout.UniformInset(unit.Dp(6))
|
||||
@ -64,11 +68,17 @@ func (t *Tracker) layoutSongButtons(gtx C) D {
|
||||
copySongBtnStyle.Inset = layout.UniformInset(unit.Dp(6))
|
||||
copySongBtnStyle.Color = primaryColor
|
||||
|
||||
pasteBtnStyle := material.IconButton(t.Theme, t.PasteBtn, widgetForIcon(icons.ContentContentPaste))
|
||||
pasteBtnStyle.Background = transparent
|
||||
pasteBtnStyle.Inset = layout.UniformInset(unit.Dp(6))
|
||||
pasteBtnStyle.Color = primaryColor
|
||||
|
||||
menuContents := func(gtx C) D {
|
||||
return layout.Flex{Axis: layout.Vertical}.Layout(gtx,
|
||||
layout.Rigid(newBtnStyle.Layout),
|
||||
layout.Rigid(loadBtnStyle.Layout),
|
||||
layout.Rigid(copySongBtnStyle.Layout),
|
||||
layout.Rigid(pasteBtnStyle.Layout),
|
||||
)
|
||||
}
|
||||
|
||||
|
@ -54,6 +54,7 @@ type Tracker struct {
|
||||
InstrumentNameEditor *widget.Editor
|
||||
NewTrackBtn *widget.Clickable
|
||||
CopySongBtn *widget.Clickable
|
||||
PasteBtn *widget.Clickable
|
||||
NewInstrumentBtn *widget.Clickable
|
||||
DeleteInstrumentBtn *widget.Clickable
|
||||
LoadSongFileBtn *widget.Clickable
|
||||
@ -670,6 +671,7 @@ func New(audioContext sointu.AudioContext, synthService sointu.SynthService) *Tr
|
||||
DeleteInstrumentBtn: new(widget.Clickable),
|
||||
NewSongFileBtn: new(widget.Clickable),
|
||||
CopySongBtn: new(widget.Clickable),
|
||||
PasteBtn: new(widget.Clickable),
|
||||
FileMenuBtn: new(widget.Clickable),
|
||||
LoadSongFileBtn: new(widget.Clickable),
|
||||
SaveSongFileBtn: new(widget.Clickable),
|
||||
|
Loading…
x
Reference in New Issue
Block a user