mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-06 09:55:40 +00:00
example/kitchen: ensure widgets are enabled when taking a screenshot
Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -20,6 +20,7 @@ import (
|
|||||||
"gioui.org/app"
|
"gioui.org/app"
|
||||||
"gioui.org/app/headless"
|
"gioui.org/app/headless"
|
||||||
"gioui.org/font/gofont"
|
"gioui.org/font/gofont"
|
||||||
|
"gioui.org/io/router"
|
||||||
"gioui.org/io/system"
|
"gioui.org/io/system"
|
||||||
"gioui.org/layout"
|
"gioui.org/layout"
|
||||||
"gioui.org/op"
|
"gioui.org/op"
|
||||||
@@ -88,6 +89,7 @@ func saveScreenshot(f string) error {
|
|||||||
Ops: new(op.Ops),
|
Ops: new(op.Ops),
|
||||||
Config: &scaledConfig{scale},
|
Config: &scaledConfig{scale},
|
||||||
Constraints: layout.Exact(sz),
|
Constraints: layout.Exact(sz),
|
||||||
|
Queue: new(router.Router),
|
||||||
}
|
}
|
||||||
th := material.NewTheme(gofont.Collection())
|
th := material.NewTheme(gofont.Collection())
|
||||||
kitchen(gtx, th)
|
kitchen(gtx, th)
|
||||||
|
|||||||
Reference in New Issue
Block a user