example/kitchen: add CheckBox example

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2019-11-04 00:34:42 +01:00
parent 0f5b94a483
commit 65146a5337
5 changed files with 10 additions and 6 deletions
+4
View File
@@ -71,6 +71,7 @@ var (
green = true
topLabel = "Hello, Gio"
icon *material.Icon
checkbox = new(widget.CheckBox)
)
func kitchen(gtx *layout.Context, th *material.Theme) {
@@ -121,6 +122,9 @@ func kitchen(gtx *layout.Context, th *material.Theme) {
})
buttons.Layout(gtx, b1, b2, b3)
},
func() {
th.CheckBox("Checkbox").Layout(gtx, checkbox)
},
}
list.Layout(gtx, len(widgets), func(i int) {
layout.UniformInset(unit.Dp(16)).Layout(gtx, widgets[i])