example/kitchen: ensure widgets are enabled when taking a screenshot

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2020-06-12 16:59:12 +02:00
parent 6d5fbcba3f
commit 4c28369aa2
+2
View File
@@ -20,6 +20,7 @@ import (
"gioui.org/app"
"gioui.org/app/headless"
"gioui.org/font/gofont"
"gioui.org/io/router"
"gioui.org/io/system"
"gioui.org/layout"
"gioui.org/op"
@@ -88,6 +89,7 @@ func saveScreenshot(f string) error {
Ops: new(op.Ops),
Config: &scaledConfig{scale},
Constraints: layout.Exact(sz),
Queue: new(router.Router),
}
th := material.NewTheme(gofont.Collection())
kitchen(gtx, th)