widget/material: add hovered to RadioButton

Signed-off-by: Egon Elbre <egonelbre@gmail.com>
This commit is contained in:
Egon Elbre
2021-01-17 18:28:45 +02:00
committed by Elias Naur
parent 0b736990a9
commit bc6798c4ca
2 changed files with 9 additions and 2 deletions
+1 -1
View File
@@ -36,7 +36,7 @@ func RadioButton(th *Theme, group *widget.Enum, key, label string) RadioButtonSt
// Layout updates enum and displays the radio button.
func (r RadioButtonStyle) Layout(gtx layout.Context) layout.Dimensions {
dims := r.layout(gtx, r.Group.Value == r.Key, false)
dims := r.layout(gtx, r.Group.Value == r.Key, r.Group.Hovered == r.Key)
gtx.Constraints.Min = dims.Size
r.Group.Layout(gtx, r.Key)
return dims