From 60fd129fdac4ae13d169610133e17bdfb53345ce Mon Sep 17 00:00:00 2001 From: Elias Naur Date: Mon, 3 Jun 2019 15:24:00 +0200 Subject: [PATCH] apps/gophers: upgrade to OpArea API Signed-off-by: Elias Naur --- apps/go.mod | 2 +- apps/gophers/main.go | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/apps/go.mod b/apps/go.mod index 4df2d96a..45af225d 100644 --- a/apps/go.mod +++ b/apps/go.mod @@ -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 diff --git a/apps/gophers/main.go b/apps/gophers/main.go index 93c9a6e1..5ec2ca32 100644 --- a/apps/gophers/main.go +++ b/apps/gophers/main.go @@ -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)