widget/material: add hover to CheckBox

Signed-off-by: Egon Elbre <egonelbre@gmail.com>
This commit is contained in:
Egon Elbre
2021-01-17 18:22:10 +02:00
committed by Elias Naur
parent 468bd6f53a
commit 0b736990a9
3 changed files with 48 additions and 14 deletions
+1 -1
View File
@@ -31,7 +31,7 @@ func CheckBox(th *Theme, checkBox *widget.Bool, label string) CheckBoxStyle {
// Layout updates the checkBox and displays it.
func (c CheckBoxStyle) Layout(gtx layout.Context) layout.Dimensions {
dims := c.layout(gtx, c.CheckBox.Value)
dims := c.layout(gtx, c.CheckBox.Value, c.CheckBox.Hovered())
gtx.Constraints.Min = dims.Size
c.CheckBox.Layout(gtx)
return dims