mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-05 01:15:35 +00:00
example/kitchen: add CheckBox example
Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -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])
|
||||
|
||||
Reference in New Issue
Block a user