widget/material: updated Switch comments.

Signed-off-by: pierre <pierre.curto@gmail.com>
This commit is contained in:
pierre
2020-12-22 16:04:04 +01:00
committed by Elias Naur
parent 18d4dbf60c
commit 8a148ad6a1
+2 -1
View File
@@ -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))