mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-04 08:55:35 +00:00
widget/material: add missing Update calls
Without the updates, the switch and radiobutton would use stale state for layout. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -39,6 +39,7 @@ func Switch(th *Theme, swtch *widget.Bool, description string) SwitchStyle {
|
||||
|
||||
// Layout updates the switch and displays it.
|
||||
func (s SwitchStyle) Layout(gtx layout.Context) layout.Dimensions {
|
||||
s.Switch.Update(gtx)
|
||||
trackWidth := gtx.Dp(36)
|
||||
trackHeight := gtx.Dp(16)
|
||||
thumbSize := gtx.Dp(20)
|
||||
|
||||
Reference in New Issue
Block a user