example: update gio version

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2019-10-15 23:35:08 +02:00
parent 45ccbbe571
commit 8234e8485c
3 changed files with 17 additions and 19 deletions
+1 -1
View File
@@ -3,7 +3,7 @@ module gioui.org/example
go 1.13
require (
gioui.org v0.0.0-20191014161730-8da2c9dbb4c4
gioui.org v0.0.0-20191015213331-45ccbbe5714e
github.com/google/go-github/v24 v24.0.1
golang.org/x/exp v0.0.0-20191002040644-a1355ae1e2c3
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45
+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-20191014161730-8da2c9dbb4c4 h1:qPPb0TIQ5hVjk7XOg/E7nZL2ImiOgWAmWH9kATsaN3w=
gioui.org v0.0.0-20191014161730-8da2c9dbb4c4/go.mod h1:KqFFi2Dq5gYA3FJ0sDOt8OBXoMsuxMtE8v2f0JExXAY=
gioui.org v0.0.0-20191015213331-45ccbbe5714e h1:I4r3b5emThrl5J52Wq4HzqRGqZLRMwWw/XUit8VU+OY=
gioui.org v0.0.0-20191015213331-45ccbbe5714e/go.mod h1:KqFFi2Dq5gYA3FJ0sDOt8OBXoMsuxMtE8v2f0JExXAY=
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/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM=
+14 -16
View File
@@ -186,19 +186,8 @@ func (up *userPage) commit(gtx *layout.Context, index int) {
}
func (u *UI) layoutUsers(gtx *layout.Context) {
var st layout.Stack
c2 := st.Rigid(gtx, func() {
layout.Align(layout.SE).Layout(gtx, func() {
in := layout.UniformInset(unit.Dp(16))
in.Layout(gtx, func() {
for u.fab.Clicked(gtx) {
}
theme.IconButton(u.fabIcon).Layout(gtx, u.fab)
})
})
})
c1 := st.Expand(gtx, func() {
st := layout.Stack{Alignment: layout.SE}
c1 := st.Rigid(gtx, func() {
f := layout.Flex{Axis: layout.Vertical}
c1 := f.Rigid(gtx, func() {
@@ -223,8 +212,7 @@ func (u *UI) layoutUsers(gtx *layout.Context) {
})
c3 := f.Rigid(gtx, func() {
gtx.Constraints.Width.Min = gtx.Constraints.Width.Max
s := layout.Stack{Alignment: layout.Center}
s := layout.Stack{}
c2 := s.Rigid(gtx, func() {
in := layout.Inset{Top: unit.Dp(16), Right: unit.Dp(8), Bottom: unit.Dp(8), Left: unit.Dp(8)}
in.Layout(gtx, func() {
@@ -234,6 +222,7 @@ func (u *UI) layoutUsers(gtx *layout.Context) {
})
})
c1 := s.Expand(gtx, func() {
gtx.Constraints.Width.Min = gtx.Constraints.Width.Max
fill{rgb(0xf2f2f2)}.Layout(gtx)
})
s.Layout(gtx, c1, c2)
@@ -245,6 +234,15 @@ func (u *UI) layoutUsers(gtx *layout.Context) {
})
f.Layout(gtx, c1, c2, c3, c4)
})
c2 := st.Rigid(gtx, func() {
in := layout.UniformInset(unit.Dp(16))
in.Layout(gtx, func() {
for u.fab.Clicked(gtx) {
}
theme.IconButton(u.fabIcon).Layout(gtx, u.fab)
})
})
st.Layout(gtx, c1, c2)
}
@@ -318,7 +316,7 @@ type fill struct {
func (f fill) Layout(gtx *layout.Context) {
cs := gtx.Constraints
d := image.Point{X: cs.Width.Max, Y: cs.Height.Max}
d := image.Point{X: cs.Width.Min, Y: cs.Height.Min}
dr := f32.Rectangle{
Max: f32.Point{X: float32(d.X), Y: float32(d.Y)},
}