~eliasnaur/gio

60fd129fdac4ae13d169610133e17bdfb53345ce — Elias Naur 2 years ago 955fe1b
apps/gophers: upgrade to OpArea API

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2 files changed, 5 insertions(+), 3 deletions(-)

M apps/go.mod
M apps/gophers/main.go
M apps/go.mod => apps/go.mod +1 -1
@@ 3,7 3,7 @@ module gioui.org/apps
go 1.12

require (
	gioui.org/ui v0.0.0-20190602201804-1e38eec0abc1
	gioui.org/ui v0.0.0-20190603132211-955fe1bc7705
	github.com/google/go-github/v24 v24.0.1
	golang.org/x/exp v0.0.0-20190321205749-f0864edee7f3
	golang.org/x/image v0.0.0-20190321063152-3fc05d484e9f

M apps/gophers/main.go => apps/gophers/main.go +4 -2
@@ 553,7 553,8 @@ func (a *ActionButton) Layout(ops *ui.Ops, cs layout.Constraints) layout.Dimens 
	in := layout.Insets{Top: c.Dp(4)}
	cs = in.Begin(ops, cs)
	dims := fab(ops, cs, a.sendIco.image(c), fabCol, c.Dp(56))
	a.btnClicker.Op(ops, &gesture.Ellipse{dims.Size})
	pointer.AreaEllipse(dims.Size).Add(ops)
	a.btnClicker.Add(ops)
	dims = in.End(ops, dims)
	return f.Layout(ops, f.End(ops, dims))
}


@@ 638,7 639,8 @@ func (a *App) user(ops *ui.Ops, cs layout.Constraints, c *ui.Config, index int) 
		c2 := f.End(ops, dims)
		dims = f.Layout(ops, c1, c2)
		dims = in.End(ops, dims)
		click.Op(ops, &gesture.Rect{dims.Size})
		pointer.AreaRect(dims.Size).Add(ops)
		click.Add(ops)
	}
	c1 := elem.End(ops, dims)
	return elem.Layout(ops, c1)