From 90c6531b23b4c5b252e137024d1a60b0520d86ac Mon Sep 17 00:00:00 2001 From: Sander Schobers Date: Mon, 18 May 2020 11:08:38 +0200 Subject: [PATCH] Fixed bug where disabled IconButton triggered supplied click handler. --- iconbutton.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iconbutton.go b/iconbutton.go index bab76a5..bc1acfb 100644 --- a/iconbutton.go +++ b/iconbutton.go @@ -35,7 +35,7 @@ func NewIconButton(icon string, click ui.EventEmptyFn) *IconButton { Icon: icon, }, } - b.ControlClicked().AddHandler(func(ctx ui.Context, _ ui.ControlClickedArgs) { click(ctx) }) + b.ButtonClicked().AddHandler(func(ctx ui.Context, _ ui.ControlClickedArgs) { click(ctx) }) return b }