unfocus grid view items when tapping between them

This commit is contained in:
Drew Weymouth
2024-02-18 09:19:37 -08:00
parent c6687aaa95
commit 8d038ced64
2 changed files with 12 additions and 0 deletions
+6
View File
@@ -274,6 +274,12 @@ func (g *GridViewItem) TypedRune(rune) {
// intentionally blank
}
var _ fyne.Tappable = (*GridViewItem)(nil)
func (g *GridViewItem) Tapped(*fyne.PointEvent) {
fyne.CurrentApp().Driver().CanvasForObject(g).Unfocus()
}
func (g *GridViewItem) CreateRenderer() fyne.WidgetRenderer {
return widget.NewSimpleRenderer(g.container)
}