mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-04 17:05:38 +00:00
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:
@@ -155,7 +155,7 @@ func (s ScrollbarStyle) layout(gtx layout.Context, axis layout.Axis, viewportSta
|
||||
area := image.Rectangle{
|
||||
Max: gtx.Constraints.Min,
|
||||
}
|
||||
pointerArea := pointer.Rect(area)
|
||||
pointerArea := clip.Rect(area)
|
||||
defer pointerArea.Push(gtx.Ops).Pop()
|
||||
s.Scrollbar.AddDrag(gtx.Ops)
|
||||
|
||||
@@ -205,7 +205,7 @@ func (s ScrollbarStyle) layout(gtx layout.Context, axis layout.Axis, viewportSta
|
||||
}.Op(gtx.Ops))
|
||||
|
||||
// Add the indicator pointer hit area.
|
||||
area := pointer.Rect(image.Rectangle{Max: indicatorDims})
|
||||
area := clip.Rect(image.Rectangle{Max: indicatorDims})
|
||||
defer pointer.PassOp{}.Push(gtx.Ops).Pop()
|
||||
defer area.Push(gtx.Ops).Pop()
|
||||
s.Scrollbar.AddIndicator(gtx.Ops)
|
||||
|
||||
Reference in New Issue
Block a user