Fixed bug where disabled IconButton triggered supplied click handler.

This commit is contained in:
Sander Schobers 2020-05-18 11:08:38 +02:00
parent 4b57ace9d6
commit 90c6531b23

View File

@ -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
}