all: replace deprecated pointer.Rect with clip.Rect

Converted with

gofmt -w -r 'pointer.Rect(r) -> clip.Rect(r)' .
gofmt -w -r 'pointer.Ellipse(r) -> clip.Ellipse(layout.FRect(r))' .

combined with 'goimports -w .' to clean up imports.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2021-10-26 12:53:54 +02:00
parent 29cea1db49
commit 3e0b72304a
13 changed files with 41 additions and 39 deletions
+3 -2
View File
@@ -123,9 +123,10 @@ func (w *quarterWidget) Layout(gtx layout.Context) layout.Dimensions {
r := image.Rectangle{Max: gtx.Constraints.Max}
paint.FillShape(gtx.Ops, color, clip.Rect(r).Op())
pointer.Rect(image.Rectangle{
clip.Rect(image.Rectangle{
Max: image.Pt(gtx.Constraints.Max.X, gtx.Constraints.Max.Y),
}).Add(gtx.Ops)
}).
Add(gtx.Ops)
pointer.InputOp{
Tag: w,
Types: pointer.Press,