~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

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

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

---
 component/nav_drawer.go | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/component/nav_drawer.go b/component/nav_drawer.go
index ca84e85..2c69066 100644
--- a/component/nav_drawer.go
+++ b/component/nav_drawer.go
@@ -252,6 +252,11 @@ 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 {
		return
-- 
2.36.1
Reply to thread Export thread (mbox)