From 8a148ad6a1ab0da9103f74750aaf8aff97513587 Mon Sep 17 00:00:00 2001 From: pierre Date: Tue, 22 Dec 2020 16:04:04 +0100 Subject: [PATCH] widget/material: updated Switch comments. Signed-off-by: pierre --- widget/material/switch.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/widget/material/switch.go b/widget/material/switch.go index fb0e9ecf..bf1d8eaa 100644 --- a/widget/material/switch.go +++ b/widget/material/switch.go @@ -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))