cmd/tailscale: bump gio version

Signed-off-by: Elias Naur <mail@eliasnaur.com>
pull/2/head
Elias Naur 4 years ago
parent 5a6626d1e6
commit 920aba4ff1

@ -264,9 +264,7 @@ type Dismiss struct {
}
func (d *Dismiss) Add(gtx layout.Context) {
var stack op.StackOp
stack.Push(gtx.Ops)
defer stack.Pop()
defer op.Push(gtx.Ops).Pop()
pointer.Rect(image.Rectangle{Max: gtx.Constraints.Min}).Add(gtx.Ops)
pointer.InputOp{Tag: d}.Add(gtx.Ops)
}
@ -453,8 +451,7 @@ func (ui *UI) layoutMenu(gtx layout.Context, sysIns system.Insets, expiry time.T
f := layout.Flex{Axis: layout.Vertical}
// First pass: record and discard operations
// and determine widest item.
var m op.MacroOp
m.Record(gtx.Ops)
m := op.Record(gtx.Ops)
f.Layout(gtx, children...)
m.Stop()
// Second pass: layout items with equal width.
@ -689,13 +686,11 @@ func drawLogo(ops *op.Ops, size int) {
tx := op.TransformOp{}.Offset(f32.Pt(off, 0))
ty := op.TransformOp{}.Offset(f32.Pt(0, off))
var st op.StackOp
st.Push(ops)
st := op.Push(ops)
defer st.Pop()
var row op.StackOp
// First row of discs.
row.Push(ops)
row := op.Push(ops)
drawDisc(ops, discDia, rgb(0x54514d))
tx.Add(ops)
drawDisc(ops, discDia, rgb(0x54514d))
@ -705,7 +700,7 @@ func drawLogo(ops *op.Ops, size int) {
ty.Add(ops)
// Second row.
row.Push(ops)
row = op.Push(ops)
drawDisc(ops, discDia, rgb(0xfffdfa))
tx.Add(ops)
drawDisc(ops, discDia, rgb(0xfffdfa))
@ -715,7 +710,7 @@ func drawLogo(ops *op.Ops, size int) {
ty.Add(ops)
// Third row.
row.Push(ops)
row = op.Push(ops)
drawDisc(ops, discDia, rgb(0x54514d))
tx.Add(ops)
drawDisc(ops, discDia, rgb(0xfffdfa))
@ -725,9 +720,7 @@ func drawLogo(ops *op.Ops, size int) {
}
func drawDisc(ops *op.Ops, radius float32, col color.RGBA) {
var st op.StackOp
st.Push(ops)
defer st.Pop()
defer op.Push(ops).Pop()
r2 := radius * .5
dr := f32.Rectangle{Max: f32.Pt(radius, radius)}
clip.Rect{
@ -746,11 +739,10 @@ type Background struct {
}
func (b Background) 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)
sz := dims.Size
m.Stop()
call := m.Stop()
// Clip corners, if any.
if r := gtx.Px(b.CornerRadius); r > 0 {
rr := float32(r)
@ -763,7 +755,7 @@ func (b Background) Layout(gtx layout.Context, w layout.Widget) layout.Dimension
}.Op(gtx.Ops).Add(gtx.Ops)
}
fill{b.Color}.Layout(gtx, sz)
m.Add()
call.Add(gtx.Ops)
return dims
}
@ -772,9 +764,7 @@ type fill struct {
}
func (f fill) Layout(gtx layout.Context, sz image.Point) layout.Dimensions {
var st op.StackOp
st.Push(gtx.Ops)
defer st.Pop()
defer op.Push(gtx.Ops).Pop()
dr := f32.Rectangle{Max: layout.FPt(sz)}
paint.ColorOp{Color: f.col}.Add(gtx.Ops)
paint.PaintOp{Rect: dr}.Add(gtx.Ops)

@ -3,7 +3,7 @@ module tailscale.com/tailscale-android
go 1.14
require (
gioui.org v0.0.0-20200531220444-28bf9e200143
gioui.org v0.0.0-20200602143738-d489c20b8421
gioui.org/cmd v0.0.0-20200530141830-d2c67cdf8039
github.com/tailscale/wireguard-go v0.0.0-20200515231107-62868271d710
golang.org/x/exp v0.0.0-20191002040644-a1355ae1e2c3

@ -1,8 +1,8 @@
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-20200530124200-1377bea3cdc5/go.mod h1:AHI9rFr6AEEHCb8EPVtb/p5M+NMJRKH58IOp8O3Je04=
gioui.org v0.0.0-20200531220444-28bf9e200143 h1:B3j67PQaeCzLlleL3ZZgkYgGamJEsGBOqqXsoJ7YgJE=
gioui.org v0.0.0-20200531220444-28bf9e200143/go.mod h1:AHI9rFr6AEEHCb8EPVtb/p5M+NMJRKH58IOp8O3Je04=
gioui.org v0.0.0-20200602143738-d489c20b8421 h1:/NywuUDhhmCUQfB7CnxS7TQZ9Fid5rQaBbhy6rv1FYM=
gioui.org v0.0.0-20200602143738-d489c20b8421/go.mod h1:AHI9rFr6AEEHCb8EPVtb/p5M+NMJRKH58IOp8O3Je04=
gioui.org/cmd v0.0.0-20200530141830-d2c67cdf8039 h1:mO1CTk+PwcDQGMXpN1JJiFflYBvwqSQ6+3Gvp64IKHo=
gioui.org/cmd v0.0.0-20200530141830-d2c67cdf8039/go.mod h1:B1g+HOceSj7g3S4Yao3skwInTpcK978KANys5YuapMc=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=

Loading…
Cancel
Save