~eliasnaur/gio-patches

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
1

[PATCH gio-x] component: adding a way to remove selected item

Details
Message ID
<20220608194741.2131449-1-dever@alt.tf>
DKIM signature
pass
Download raw message
Patch: +6 -1
From: er <dever@alt.tf>

Signed-off-by: er <dever@alt.tf>
---
 component/nav_drawer.go | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/component/nav_drawer.go b/component/nav_drawer.go
index 42da240..c7e8b7d 100644
--- a/component/nav_drawer.go
+++ b/component/nav_drawer.go
@@ -251,8 +251,13 @@ func (m *NavDrawer) layoutNavList(gtx layout.Context, th *material.Theme, anim *
	})
}

func (m *NavDrawer) UnselectNavDestination() {
	m.items[m.selectedItem].selected = false
	m.selectedChanged = false
}

func (m *NavDrawer) changeSelected(newIndex int) {
	if newIndex == m.selectedItem {
	if newIndex == m.selectedItem && m.items[m.selectedItem].selected {
		return
	}
	m.items[m.selectedItem].selected = false
-- 
2.36.1
Details
Message ID
<CAFcc3FQFDYX1=Rv4BDrBLsWsF-=WT5LYjjy+qufHbCBrg-qrMA@mail.gmail.com>
In-Reply-To
<20220608194741.2131449-1-dever@alt.tf> (view parent)
DKIM signature
pass
Download raw message
Thanks! Merged.
Reply to thread Export thread (mbox)