refactor(tracker): remove Contents from PopupStyle; pass it to Layout instead

This commit is contained in:
vsariola
2021-02-03 16:34:22 +02:00
parent 21b620c824
commit 29b289d2fb
2 changed files with 5 additions and 7 deletions

View File

@ -58,7 +58,7 @@ func (t *Tracker) layoutSongButtons(gtx C) D {
)
}
fileMenu := Popup(&t.FileMenuVisible, menuContents)
fileMenu := Popup(&t.FileMenuVisible)
fileMenu.NE = unit.Dp(0)
fileMenu.ShadowN = unit.Dp(0)
fileMenu.NW = unit.Dp(0)
@ -83,7 +83,7 @@ func (t *Tracker) layoutSongButtons(gtx C) D {
op.Offset(f32.Pt(0, float32(dims.Size.Y))).Add(gtx.Ops)
gtx.Constraints.Max.X = 160
gtx.Constraints.Max.Y = 300
fileMenu.Layout(gtx)
fileMenu.Layout(gtx, menuContents)
return dims
}