mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-01 07:35:40 +00:00
widget/material: updated Switch comments.
Signed-off-by: pierre <pierre.curto@gmail.com>
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user