mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-05 17:35:36 +00:00
apps: update to newest gio version
Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
+1
-1
@@ -3,7 +3,7 @@ module gioui.org/apps
|
|||||||
go 1.12
|
go 1.12
|
||||||
|
|
||||||
require (
|
require (
|
||||||
gioui.org/ui v0.0.0-20190714173331-587b88d346ee
|
gioui.org/ui v0.0.0-20190715171611-667670f9c656
|
||||||
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-20190627132806-fd42eb6b336f
|
golang.org/x/exp v0.0.0-20190627132806-fd42eb6b336f
|
||||||
golang.org/x/image v0.0.0-20190703141733-d6a02ce849c9
|
golang.org/x/image v0.0.0-20190703141733-d6a02ce849c9
|
||||||
|
|||||||
@@ -228,7 +228,7 @@ func (a *App) run() error {
|
|||||||
case app.DrawEvent:
|
case app.DrawEvent:
|
||||||
ops.Reset()
|
ops.Reset()
|
||||||
a.cfg = e.Config
|
a.cfg = e.Config
|
||||||
cs := layout.ExactConstraints(e.Size)
|
cs := layout.RigidConstraints(e.Size)
|
||||||
a.Layout(ops, cs)
|
a.Layout(ops, cs)
|
||||||
if a.profiling {
|
if a.profiling {
|
||||||
a.layoutTimings(ops, cs)
|
a.layoutTimings(ops, cs)
|
||||||
@@ -457,7 +457,7 @@ func (up *userPage) commit(ops *ui.Ops, cs layout.Constraints, index int) layout
|
|||||||
sz := c.Px(ui.Dp(48))
|
sz := c.Px(ui.Dp(48))
|
||||||
cc := clipCircle{}
|
cc := clipCircle{}
|
||||||
cs = cc.Begin(ops, cs)
|
cs = cc.Begin(ops, cs)
|
||||||
cs = cs.Exact(sz, sz)
|
cs = layout.RigidConstraints(cs.Constrain(image.Point{X: sz, Y: sz}))
|
||||||
dims := widget.Image{Src: u.avatar, Rect: u.avatar.Bounds()}.Layout(c, ops, cs)
|
dims := widget.Image{Src: u.avatar, Rect: u.avatar.Bounds()}.Layout(c, ops, cs)
|
||||||
dims = cc.End(dims)
|
dims = cc.End(dims)
|
||||||
c1 := f.End(dims)
|
c1 := f.End(dims)
|
||||||
@@ -513,7 +513,7 @@ func (a *App) layoutUsers(ops *ui.Ops, cs layout.Constraints) layout.Dimens {
|
|||||||
cs.Width.Min = cs.Width.Max
|
cs.Width.Min = cs.Width.Max
|
||||||
in := layout.EqualInsets(ui.Dp(16))
|
in := layout.EqualInsets(ui.Dp(16))
|
||||||
sz := c.Px(ui.Dp(200))
|
sz := c.Px(ui.Dp(200))
|
||||||
cs = cs.Exact(sz, sz)
|
cs = layout.RigidConstraints(cs.Constrain(image.Point{X: sz, Y: sz}))
|
||||||
dims = a.edit.Layout(ops, in.Begin(c, ops, cs))
|
dims = a.edit.Layout(ops, in.Begin(c, ops, cs))
|
||||||
dims = in.End(dims)
|
dims = in.End(dims)
|
||||||
}
|
}
|
||||||
@@ -595,7 +595,8 @@ func (a *App) user(c ui.Config, ops *ui.Ops, cs layout.Constraints, index int) l
|
|||||||
in := layout.Insets{Right: ui.Dp(8)}
|
in := layout.Insets{Right: ui.Dp(8)}
|
||||||
cc := clipCircle{}
|
cc := clipCircle{}
|
||||||
cs = cc.Begin(ops, in.Begin(c, ops, cs))
|
cs = cc.Begin(ops, in.Begin(c, ops, cs))
|
||||||
cs = cs.Exact(c.Px(ui.Dp(48)), c.Px(ui.Dp(48)))
|
sz := image.Point{X: c.Px(ui.Dp(48)), Y: c.Px(ui.Dp(48))}
|
||||||
|
cs = layout.RigidConstraints(cs.Constrain(sz))
|
||||||
dims = widget.Image{Src: u.avatar, Rect: u.avatar.Bounds()}.Layout(c, ops, cs)
|
dims = widget.Image{Src: u.avatar, Rect: u.avatar.Bounds()}.Layout(c, ops, cs)
|
||||||
dims = in.End(cc.End(dims))
|
dims = in.End(cc.End(dims))
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -52,7 +52,7 @@ func loop(w *app.Window) error {
|
|||||||
return e.Err
|
return e.Err
|
||||||
case app.DrawEvent:
|
case app.DrawEvent:
|
||||||
cfg = e.Config
|
cfg = e.Config
|
||||||
cs := layout.ExactConstraints(e.Size)
|
cs := layout.RigidConstraints(e.Size)
|
||||||
ops.Reset()
|
ops.Reset()
|
||||||
ops.Begin()
|
ops.Begin()
|
||||||
draw.ColorOp{Color: maroon}.Add(ops)
|
draw.ColorOp{Color: maroon}.Add(ops)
|
||||||
|
|||||||
Reference in New Issue
Block a user