fix(tracker): clicking anywhere outside a menu closes it but does not trigger other action

Closes #27
This commit is contained in:
vsariola
2021-02-15 19:21:54 +02:00
parent 070833ed9c
commit 712a4c927b
2 changed files with 1 additions and 2 deletions

View File

@ -56,7 +56,6 @@ func (s PopupStyle) Layout(gtx C, contents layout.Widget) D {
}
bg := func(gtx C) D {
pointer.PassOp{Pass: true}.Add(gtx.Ops)
pointer.InputOp{Tag: s.Visible,
Types: pointer.Press,
}.Add(gtx.Ops)

View File

@ -88,7 +88,7 @@ func (t *Tracker) layoutSongButtons(gtx C) D {
fileMenuBtnStyle.Color = primaryColor
for t.FileMenuBtn.Clicked() {
t.FileMenuVisible = true
t.FileMenuVisible = !t.FileMenuVisible
}
popupWidget := func(gtx C) D {