cmd/gogio/testdata: always clear background to white

The webassembly port changed to use transparent black to allow content
below Gio to show through. However, the end-to-end tests expect a white
background.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2021-02-18 09:06:24 +01:00
parent 4f3f0fa50c
commit ffb56f42b9
3 changed files with 5 additions and 3 deletions
+2
View File
@@ -67,6 +67,8 @@ func loop(w *app.Window) error {
return e.Err
case system.FrameEvent:
gtx := layout.NewContext(&ops, e)
// Clear background to white, even on embedded platforms such as webassembly.
paint.Fill(gtx.Ops, color.NRGBA{A: 0xff, R: 0xff, G: 0xff, B: 0xff})
layout.Flex{Axis: layout.Vertical}.Layout(gtx,
layout.Flexed(1, func(gtx C) D {
return layout.Flex{Axis: layout.Horizontal}.Layout(gtx,