mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-07 18:35:34 +00:00
example: update gio version
Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
+1
-1
@@ -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
@@ -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=
|
||||||
|
|||||||
@@ -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 {
|
||||||
|
|||||||
@@ -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)
|
||||||
|
|||||||
@@ -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(),
|
||||||
|
|||||||
@@ -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 {
|
||||||
|
|||||||
Reference in New Issue
Block a user