diff --git a/cmd/go.mod b/cmd/go.mod index ec64ac3c..2c0d7b81 100644 --- a/cmd/go.mod +++ b/cmd/go.mod @@ -3,7 +3,7 @@ module gioui.org/cmd go 1.13 require ( - gioui.org v0.0.0-20200607064236-483084f4becd + gioui.org v0.0.0-20200607143106-f710bdf8e8f1 github.com/chromedp/cdproto v0.0.0-20191114225735-6626966fbae4 github.com/chromedp/chromedp v0.5.2 golang.org/x/image v0.0.0-20190802002840-cff245a6509b diff --git a/cmd/go.sum b/cmd/go.sum index 8f17a6f6..85ac386c 100644 --- a/cmd/go.sum +++ b/cmd/go.sum @@ -1,6 +1,6 @@ dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -gioui.org v0.0.0-20200607064236-483084f4becd h1:qnVH6k93cRgl8UJ2lfSPqFpz/3C8iz/hCrme6+CEBz4= -gioui.org v0.0.0-20200607064236-483084f4becd/go.mod h1:AHI9rFr6AEEHCb8EPVtb/p5M+NMJRKH58IOp8O3Je04= +gioui.org v0.0.0-20200607143106-f710bdf8e8f1 h1:mkhlEjXxmINvmSyI+MMwSJUFHFYoBd/7hPvijrO9v/w= +gioui.org v0.0.0-20200607143106-f710bdf8e8f1/go.mod h1:AHI9rFr6AEEHCb8EPVtb/p5M+NMJRKH58IOp8O3Je04= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802 h1:1BDTz0u9nC3//pOCMdNH+CiXJVYJh5UQNCOBG7jbELc= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/chromedp/cdproto v0.0.0-20191114225735-6626966fbae4 h1:QD3KxSJ59L2lxG6MXBjNHxiQO2RmxTQ3XcK+wO44WOg= diff --git a/example/glfw/main.go b/example/glfw/main.go index 2946851e..9a75fa81 100644 --- a/example/glfw/main.go +++ b/example/glfw/main.go @@ -69,11 +69,10 @@ func main() { // Enable sRGB. gl.Enable(gl.FRAMEBUFFER_SRGB) - gofont.Register() f := new(goglFunctions) var queue router.Router var ops op.Ops - th := material.NewTheme() + th := material.NewTheme(gofont.Collection()) backend, err := giogl.NewBackend(f) if err != nil { log.Fatal(err) diff --git a/example/go.mod b/example/go.mod index 1b05cfc8..f518d30c 100644 --- a/example/go.mod +++ b/example/go.mod @@ -3,7 +3,7 @@ module gioui.org/example go 1.13 require ( - gioui.org v0.0.0-20200607064236-483084f4becd + gioui.org v0.0.0-20200607143106-f710bdf8e8f1 github.com/go-gl/gl v0.0.0-20190320180904-bf2b1f2f34d7 github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72 github.com/google/go-github/v24 v24.0.1 diff --git a/example/go.sum b/example/go.sum index c52bcb46..efcc6a8c 100644 --- a/example/go.sum +++ b/example/go.sum @@ -1,7 +1,7 @@ cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -gioui.org v0.0.0-20200607064236-483084f4becd h1:qnVH6k93cRgl8UJ2lfSPqFpz/3C8iz/hCrme6+CEBz4= -gioui.org v0.0.0-20200607064236-483084f4becd/go.mod h1:AHI9rFr6AEEHCb8EPVtb/p5M+NMJRKH58IOp8O3Je04= +gioui.org v0.0.0-20200607143106-f710bdf8e8f1 h1:mkhlEjXxmINvmSyI+MMwSJUFHFYoBd/7hPvijrO9v/w= +gioui.org v0.0.0-20200607143106-f710bdf8e8f1/go.mod h1:AHI9rFr6AEEHCb8EPVtb/p5M+NMJRKH58IOp8O3Je04= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/go-gl/gl v0.0.0-20190320180904-bf2b1f2f34d7 h1:SCYMcCJ89LjRGwEa0tRluNRiMjZHalQZrVrvTbPh+qw= github.com/go-gl/gl v0.0.0-20190320180904-bf2b1f2f34d7/go.mod h1:482civXOzJJCPzJ4ZOX/pwvXBWSnzD4OKMdH4ClKGbk= diff --git a/example/gophers/ui.go b/example/gophers/ui.go index 38a7fff8..16a6c9c0 100644 --- a/example/gophers/ui.go +++ b/example/gophers/ui.go @@ -71,8 +71,7 @@ type ( ) func init() { - gofont.Register() - theme = material.NewTheme() + theme = material.NewTheme(gofont.Collection()) theme.Color.Text = rgb(0x333333) theme.Color.Hint = rgb(0xbbbbbb) } diff --git a/example/hello/hello.go b/example/hello/hello.go index 8cc34091..39166dfa 100644 --- a/example/hello/hello.go +++ b/example/hello/hello.go @@ -29,8 +29,7 @@ func main() { } func loop(w *app.Window) error { - gofont.Register() - th := material.NewTheme() + th := material.NewTheme(gofont.Collection()) var ops op.Ops for { e := <-w.Events() diff --git a/example/kitchen/kitchen.go b/example/kitchen/kitchen.go index a480920a..bd89b848 100644 --- a/example/kitchen/kitchen.go +++ b/example/kitchen/kitchen.go @@ -53,7 +53,6 @@ func main() { } icon = ic progressIncrementer = make(chan int) - gofont.Register() if *screenshot != "" { if err := saveScreenshot(*screenshot); err != nil { fmt.Fprintf(os.Stderr, "failed to save screenshot: %v\n", err) @@ -90,7 +89,7 @@ func saveScreenshot(f string) error { Config: &scaledConfig{scale}, Constraints: layout.Exact(sz), } - th := material.NewTheme() + th := material.NewTheme(gofont.Collection()) kitchen(gtx, th) w.Frame(gtx.Ops) img, err := w.Screenshot() @@ -105,7 +104,7 @@ func saveScreenshot(f string) error { } func loop(w *app.Window) error { - th := material.NewTheme() + th := material.NewTheme(gofont.Collection()) var ops op.Ops for { diff --git a/example/tabs/tabs.go b/example/tabs/tabs.go index b4c011f3..d1868083 100644 --- a/example/tabs/tabs.go +++ b/example/tabs/tabs.go @@ -33,8 +33,7 @@ func main() { } func loop(w *app.Window) error { - gofont.Register() - th := material.NewTheme() + th := material.NewTheme(gofont.Collection()) var ops op.Ops for { e := <-w.Events()