example: update gio version

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2019-10-23 10:21:08 +02:00
parent 143d2aae95
commit 9a62468c25
6 changed files with 9 additions and 7 deletions
+1 -1
View File
@@ -3,7 +3,7 @@ module gioui.org/example
go 1.13 go 1.13
require ( require (
gioui.org v0.0.0-20191021105805-3a60a384e65c gioui.org v0.0.0-20191023081811-143d2aae95dd
github.com/google/go-github/v24 v24.0.1 github.com/google/go-github/v24 v24.0.1
golang.org/x/exp v0.0.0-20191002040644-a1355ae1e2c3 golang.org/x/exp v0.0.0-20191002040644-a1355ae1e2c3
golang.org/x/image v0.0.0-20190802002840-cff245a6509b golang.org/x/image v0.0.0-20190802002840-cff245a6509b
+2 -2
View File
@@ -1,7 +1,7 @@
cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= 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= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
gioui.org v0.0.0-20191021105805-3a60a384e65c h1:42IbhLn4RDzLNrWB4ZUviW3osMRPqTbOSEyDAg8b6F0= gioui.org v0.0.0-20191023081811-143d2aae95dd h1:+k1caVAXQjs7GNZUia8dx15V0xCEFW/SixnHmpvP+PU=
gioui.org v0.0.0-20191021105805-3a60a384e65c/go.mod h1:KqFFi2Dq5gYA3FJ0sDOt8OBXoMsuxMtE8v2f0JExXAY= gioui.org v0.0.0-20191023081811-143d2aae95dd/go.mod h1:KqFFi2Dq5gYA3FJ0sDOt8OBXoMsuxMtE8v2f0JExXAY=
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM=
-2
View File
@@ -28,8 +28,6 @@ import (
_ "image/png" _ "image/png"
_ "net/http/pprof" _ "net/http/pprof"
_ "gioui.org/font/gofont"
) )
type App struct { type App struct {
+2
View File
@@ -12,6 +12,7 @@ import (
"runtime" "runtime"
"gioui.org/f32" "gioui.org/f32"
"gioui.org/font/gofont"
"gioui.org/gesture" "gioui.org/gesture"
"gioui.org/io/key" "gioui.org/io/key"
"gioui.org/io/pointer" "gioui.org/io/pointer"
@@ -64,6 +65,7 @@ type user struct {
var theme *material.Theme var theme *material.Theme
func init() { func init() {
gofont.Register()
theme = material.NewTheme() theme = material.NewTheme()
theme.Color.Text = rgb(0x333333) theme.Color.Text = rgb(0x333333)
theme.Color.Hint = rgb(0xbbbbbb) theme.Color.Hint = rgb(0xbbbbbb)
+2 -1
View File
@@ -14,7 +14,7 @@ import (
"gioui.org/text" "gioui.org/text"
"gioui.org/widget/material" "gioui.org/widget/material"
_ "gioui.org/font/gofont" "gioui.org/font/gofont"
) )
func main() { func main() {
@@ -28,6 +28,7 @@ func main() {
} }
func loop(w *app.Window) error { func loop(w *app.Window) error {
gofont.Register()
th := material.NewTheme() th := material.NewTheme()
gtx := &layout.Context{ gtx := &layout.Context{
Queue: w.Queue(), Queue: w.Queue(),
+2 -1
View File
@@ -18,7 +18,7 @@ import (
"golang.org/x/exp/shiny/materialdesign/icons" "golang.org/x/exp/shiny/materialdesign/icons"
_ "gioui.org/font/gofont" "gioui.org/font/gofont"
) )
func main() { func main() {
@@ -28,6 +28,7 @@ func main() {
log.Fatal(err) log.Fatal(err)
} }
icon = ic icon = ic
gofont.Register()
go func() { go func() {
w := app.NewWindow() w := app.NewWindow()
if err := loop(w); err != nil { if err := loop(w); err != nil {