example,cmd: bump gio version

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2020-06-09 23:03:36 +02:00
parent d1ea9339d5
commit 81a84d874b
11 changed files with 19 additions and 13 deletions
+7 -1
View File
@@ -92,7 +92,13 @@ func main() {
}
width, height := window.GetSize()
sz := image.Point{X: width, Y: height}
gtx := layout.NewContext(&ops, &queue, &glfwConfig{scale}, sz)
ops.Reset()
gtx := layout.Context{
Ops: &ops,
Queue: &queue,
Config: &glfwConfig{scale},
Constraints: layout.Exact(sz),
}
draw(gtx, th)
gpu.Collect(sz, gtx.Ops)
gpu.BeginFrame()
+1 -1
View File
@@ -3,7 +3,7 @@ module gioui.org/example
go 1.13
require (
gioui.org v0.0.0-20200609202943-a24a2c9fb6a5
gioui.org v0.0.0-20200609205719-d1ea9339d5a3
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-20200609202943-a24a2c9fb6a5 h1:+TQcTYc42g7IkeCH5uyzmxK/fhZws2qjKvzwIE6Rfxg=
gioui.org v0.0.0-20200609202943-a24a2c9fb6a5/go.mod h1:AHI9rFr6AEEHCb8EPVtb/p5M+NMJRKH58IOp8O3Je04=
gioui.org v0.0.0-20200609205719-d1ea9339d5a3 h1:OtHUEpG7mEh9LLhlkVlsREK8FLu0K5W5ElosuXKHptg=
gioui.org v0.0.0-20200609205719-d1ea9339d5a3/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 -1
View File
@@ -126,7 +126,7 @@ func (a *App) run() error {
}
}
case system.FrameEvent:
gtx := layout.NewContext(&ops, e.Queue, e.Config, e.Size)
gtx := layout.NewContext(&ops, e)
a.ui.Layout(gtx)
e.Frame(gtx.Ops)
}
+1 -1
View File
@@ -37,7 +37,7 @@ func loop(w *app.Window) error {
case system.DestroyEvent:
return e.Err
case system.FrameEvent:
gtx := layout.NewContext(&ops, e.Queue, e.Config, e.Size)
gtx := layout.NewContext(&ops, e)
l := material.H1(th, "Hello, Gio")
maroon := color.RGBA{127, 0, 0, 255}
l.Color = maroon
+1 -1
View File
@@ -116,7 +116,7 @@ func loop(w *app.Window) error {
case system.DestroyEvent:
return e.Err
case system.FrameEvent:
gtx := layout.NewContext(&ops, e.Queue, e.Config, e.Size)
gtx := layout.NewContext(&ops, e)
for iconButton.Clicked() {
w.WriteClipboard(lineEditor.Text())
}
+1 -1
View File
@@ -41,7 +41,7 @@ func loop(w *app.Window) error {
case system.DestroyEvent:
return e.Err
case system.FrameEvent:
gtx := layout.NewContext(&ops, e.Queue, e.Config, e.Size)
gtx := layout.NewContext(&ops, e)
drawTabs(gtx, th)
e.Frame(gtx.Ops)
}
+1 -1
View File
@@ -49,7 +49,7 @@ func (w *window) loop(events <-chan event.Event) error {
for w.btn.Clicked() {
newWindow()
}
gtx := layout.NewContext(&ops, e.Queue, e.Config, e.Size)
gtx := layout.NewContext(&ops, e)
layout.Center.Layout(gtx, func(gtx layout.Context) layout.Dimensions {
return material.Button(th, &w.btn, "More!").Layout(gtx)
})