example,cmd: bump gio version

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2020-06-07 16:33:27 +02:00
parent f710bdf8e8
commit 352856fc24
9 changed files with 12 additions and 17 deletions
+1 -2
View File
@@ -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)
+1 -1
View File
@@ -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
+2 -2
View File
@@ -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=
+1 -2
View File
@@ -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)
}
+1 -2
View File
@@ -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()
+2 -3
View File
@@ -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 {
+1 -2
View File
@@ -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()