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
+1 -2
View File
@@ -6,7 +6,6 @@ import (
"image"
"gioui.org/gesture"
"gioui.org/io/pointer"
"gioui.org/op"
"gioui.org/op/clip"
)
@@ -296,7 +295,7 @@ func (l *List) layout(ops *op.Ops, macro op.MacroOp) Dimensions {
}
dims := l.Axis.Convert(image.Pt(pos, maxCross))
call := macro.Stop()
defer pointer.Rect(image.Rectangle{Max: dims}).Push(ops).Pop()
defer clip.Rect(image.Rectangle{Max: dims}).Push(ops).Pop()
var min, max int
if o := l.Position.Offset; o > 0 {