From 712a4c927bcaf20919f7e752efc0c70a19688dde Mon Sep 17 00:00:00 2001 From: vsariola <5684185+vsariola@users.noreply.github.com> Date: Mon, 15 Feb 2021 19:21:54 +0200 Subject: [PATCH] fix(tracker): clicking anywhere outside a menu closes it but does not trigger other action Closes #27 --- tracker/popup.go | 1 - tracker/songpanel.go | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/tracker/popup.go b/tracker/popup.go index 8b5426c..286e2c8 100644 --- a/tracker/popup.go +++ b/tracker/popup.go @@ -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) diff --git a/tracker/songpanel.go b/tracker/songpanel.go index 68cb98f..ad82587 100644 --- a/tracker/songpanel.go +++ b/tracker/songpanel.go @@ -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 {