~eliasnaur/gio

8a148ad6a1ab0da9103f74750aaf8aff97513587 — pierre 6 months ago 18d4dbf
widget/material: updated Switch comments.

Signed-off-by: pierre <pierre.curto@gmail.com>
1 files changed, 2 insertions(+), 1 deletions(-)

M widget/material/switch.go
M widget/material/switch.go => widget/material/switch.go +2 -1
@@ 26,6 26,7 @@ type SwitchStyle struct {
	Switch *widget.Bool
}

// Switch is for selecting a boolean value.
func Switch(th *Theme, swtch *widget.Bool) SwitchStyle {
	sw := SwitchStyle{
		Switch: swtch,


@@ 36,7 37,7 @@ func Switch(th *Theme, swtch *widget.Bool) SwitchStyle {
	return sw
}

// Layout updates the checkBox and displays it.
// Layout updates the switch and displays it.
func (s SwitchStyle) Layout(gtx layout.Context) layout.Dimensions {
	trackWidth := gtx.Px(unit.Dp(36))
	trackHeight := gtx.Px(unit.Dp(16))