mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-06 18:05:35 +00:00
example,cmd: bump gio version
Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
+1
-1
@@ -3,7 +3,7 @@ module gioui.org/cmd
|
|||||||
go 1.13
|
go 1.13
|
||||||
|
|
||||||
require (
|
require (
|
||||||
gioui.org v0.0.0-20200609202943-a24a2c9fb6a5
|
gioui.org v0.0.0-20200609205719-d1ea9339d5a3
|
||||||
github.com/chromedp/cdproto v0.0.0-20191114225735-6626966fbae4
|
github.com/chromedp/cdproto v0.0.0-20191114225735-6626966fbae4
|
||||||
github.com/chromedp/chromedp v0.5.2
|
github.com/chromedp/chromedp v0.5.2
|
||||||
golang.org/x/image v0.0.0-20190802002840-cff245a6509b
|
golang.org/x/image v0.0.0-20190802002840-cff245a6509b
|
||||||
|
|||||||
+2
-2
@@ -1,6 +1,6 @@
|
|||||||
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-20200609202943-a24a2c9fb6a5 h1:+TQcTYc42g7IkeCH5uyzmxK/fhZws2qjKvzwIE6Rfxg=
|
gioui.org v0.0.0-20200609205719-d1ea9339d5a3 h1:OtHUEpG7mEh9LLhlkVlsREK8FLu0K5W5ElosuXKHptg=
|
||||||
gioui.org v0.0.0-20200609202943-a24a2c9fb6a5/go.mod h1:AHI9rFr6AEEHCb8EPVtb/p5M+NMJRKH58IOp8O3Je04=
|
gioui.org v0.0.0-20200609205719-d1ea9339d5a3/go.mod h1:AHI9rFr6AEEHCb8EPVtb/p5M+NMJRKH58IOp8O3Je04=
|
||||||
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802 h1:1BDTz0u9nC3//pOCMdNH+CiXJVYJh5UQNCOBG7jbELc=
|
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802 h1:1BDTz0u9nC3//pOCMdNH+CiXJVYJh5UQNCOBG7jbELc=
|
||||||
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/chromedp/cdproto v0.0.0-20191114225735-6626966fbae4 h1:QD3KxSJ59L2lxG6MXBjNHxiQO2RmxTQ3XcK+wO44WOg=
|
github.com/chromedp/cdproto v0.0.0-20191114225735-6626966fbae4 h1:QD3KxSJ59L2lxG6MXBjNHxiQO2RmxTQ3XcK+wO44WOg=
|
||||||
|
|||||||
Vendored
+1
-1
@@ -66,7 +66,7 @@ func loop(w *app.Window) error {
|
|||||||
case system.DestroyEvent:
|
case system.DestroyEvent:
|
||||||
return e.Err
|
return e.Err
|
||||||
case system.FrameEvent:
|
case system.FrameEvent:
|
||||||
gtx := layout.NewContext(&ops, e.Queue, e.Config, e.Size)
|
gtx := layout.NewContext(&ops, e)
|
||||||
layout.Flex{Axis: layout.Vertical}.Layout(gtx,
|
layout.Flex{Axis: layout.Vertical}.Layout(gtx,
|
||||||
layout.Flexed(0.5, func(gtx C) D {
|
layout.Flexed(0.5, func(gtx C) D {
|
||||||
return layout.Flex{Axis: layout.Horizontal}.Layout(gtx,
|
return layout.Flex{Axis: layout.Horizontal}.Layout(gtx,
|
||||||
|
|||||||
@@ -92,7 +92,13 @@ func main() {
|
|||||||
}
|
}
|
||||||
width, height := window.GetSize()
|
width, height := window.GetSize()
|
||||||
sz := image.Point{X: width, Y: height}
|
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)
|
draw(gtx, th)
|
||||||
gpu.Collect(sz, gtx.Ops)
|
gpu.Collect(sz, gtx.Ops)
|
||||||
gpu.BeginFrame()
|
gpu.BeginFrame()
|
||||||
|
|||||||
+1
-1
@@ -3,7 +3,7 @@ module gioui.org/example
|
|||||||
go 1.13
|
go 1.13
|
||||||
|
|
||||||
require (
|
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/gl v0.0.0-20190320180904-bf2b1f2f34d7
|
||||||
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72
|
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72
|
||||||
github.com/google/go-github/v24 v24.0.1
|
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=
|
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-20200609202943-a24a2c9fb6a5 h1:+TQcTYc42g7IkeCH5uyzmxK/fhZws2qjKvzwIE6Rfxg=
|
gioui.org v0.0.0-20200609205719-d1ea9339d5a3 h1:OtHUEpG7mEh9LLhlkVlsREK8FLu0K5W5ElosuXKHptg=
|
||||||
gioui.org v0.0.0-20200609202943-a24a2c9fb6a5/go.mod h1:AHI9rFr6AEEHCb8EPVtb/p5M+NMJRKH58IOp8O3Je04=
|
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/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 h1:SCYMcCJ89LjRGwEa0tRluNRiMjZHalQZrVrvTbPh+qw=
|
||||||
github.com/go-gl/gl v0.0.0-20190320180904-bf2b1f2f34d7/go.mod h1:482civXOzJJCPzJ4ZOX/pwvXBWSnzD4OKMdH4ClKGbk=
|
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:
|
case system.FrameEvent:
|
||||||
gtx := layout.NewContext(&ops, e.Queue, e.Config, e.Size)
|
gtx := layout.NewContext(&ops, e)
|
||||||
a.ui.Layout(gtx)
|
a.ui.Layout(gtx)
|
||||||
e.Frame(gtx.Ops)
|
e.Frame(gtx.Ops)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ func loop(w *app.Window) error {
|
|||||||
case system.DestroyEvent:
|
case system.DestroyEvent:
|
||||||
return e.Err
|
return e.Err
|
||||||
case system.FrameEvent:
|
case system.FrameEvent:
|
||||||
gtx := layout.NewContext(&ops, e.Queue, e.Config, e.Size)
|
gtx := layout.NewContext(&ops, e)
|
||||||
l := material.H1(th, "Hello, Gio")
|
l := material.H1(th, "Hello, Gio")
|
||||||
maroon := color.RGBA{127, 0, 0, 255}
|
maroon := color.RGBA{127, 0, 0, 255}
|
||||||
l.Color = maroon
|
l.Color = maroon
|
||||||
|
|||||||
@@ -116,7 +116,7 @@ func loop(w *app.Window) error {
|
|||||||
case system.DestroyEvent:
|
case system.DestroyEvent:
|
||||||
return e.Err
|
return e.Err
|
||||||
case system.FrameEvent:
|
case system.FrameEvent:
|
||||||
gtx := layout.NewContext(&ops, e.Queue, e.Config, e.Size)
|
gtx := layout.NewContext(&ops, e)
|
||||||
for iconButton.Clicked() {
|
for iconButton.Clicked() {
|
||||||
w.WriteClipboard(lineEditor.Text())
|
w.WriteClipboard(lineEditor.Text())
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ func loop(w *app.Window) error {
|
|||||||
case system.DestroyEvent:
|
case system.DestroyEvent:
|
||||||
return e.Err
|
return e.Err
|
||||||
case system.FrameEvent:
|
case system.FrameEvent:
|
||||||
gtx := layout.NewContext(&ops, e.Queue, e.Config, e.Size)
|
gtx := layout.NewContext(&ops, e)
|
||||||
drawTabs(gtx, th)
|
drawTabs(gtx, th)
|
||||||
e.Frame(gtx.Ops)
|
e.Frame(gtx.Ops)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ func (w *window) loop(events <-chan event.Event) error {
|
|||||||
for w.btn.Clicked() {
|
for w.btn.Clicked() {
|
||||||
newWindow()
|
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 {
|
layout.Center.Layout(gtx, func(gtx layout.Context) layout.Dimensions {
|
||||||
return material.Button(th, &w.btn, "More!").Layout(gtx)
|
return material.Button(th, &w.btn, "More!").Layout(gtx)
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user