mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-04 08:55:35 +00:00
widget,widget/material: export CheckBox.Checked
Similar to the previous change to Enum, expose the current state of the CheckBox. Rename the Checked method to just Update and get rid of the SetChecked method. Fixes gio#100 Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -27,7 +27,9 @@ func CheckBox(th *Theme, label string) CheckBoxStyle {
|
||||
}
|
||||
}
|
||||
|
||||
// Layout updates the checkBox and displays it.
|
||||
func (c CheckBoxStyle) Layout(gtx *layout.Context, checkBox *widget.CheckBox) {
|
||||
c.layout(gtx, checkBox.Checked(gtx))
|
||||
checkBox.Update(gtx)
|
||||
c.layout(gtx, checkBox.Checked)
|
||||
checkBox.Layout(gtx)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user