cmd,example: bump gio version

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2020-06-02 12:20:20 +02:00
parent c19ed05342
commit 9196ce0369
6 changed files with 24 additions and 24 deletions
+4 -7
View File
@@ -352,24 +352,21 @@ type clipCircle struct {
}
func (c *clipCircle) Layout(gtx layout.Context, w layout.Widget) layout.Dimensions {
var m op.MacroOp
m.Record(gtx.Ops)
m := op.Record(gtx.Ops)
dims := w(gtx)
m.Stop()
call := m.Stop()
max := dims.Size.X
if dy := dims.Size.Y; dy > max {
max = dy
}
szf := float32(max)
rr := szf * .5
var stack op.StackOp
stack.Push(gtx.Ops)
defer op.Push(gtx.Ops).Pop()
clip.Rect{
Rect: f32.Rectangle{Max: f32.Point{X: szf, Y: szf}},
NE: rr, NW: rr, SE: rr, SW: rr,
}.Op(gtx.Ops).Add(gtx.Ops)
m.Add()
stack.Pop()
call.Add(gtx.Ops)
return dims
}