mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-04 00:45:35 +00:00
widget: change Enum.Layout to follow layout protocol
Respect constraints and return dimensions. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -37,6 +37,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)
|
||||
gtx.Constraints.Min = dims.Size
|
||||
r.Group.Layout(gtx, r.Key)
|
||||
return dims
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user