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