mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-03 00:16:15 +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:
+2
-2
@@ -9,8 +9,8 @@ import (
|
||||
"gioui.org/f32"
|
||||
"gioui.org/gesture"
|
||||
"gioui.org/io/key"
|
||||
"gioui.org/io/pointer"
|
||||
"gioui.org/layout"
|
||||
"gioui.org/op/clip"
|
||||
)
|
||||
|
||||
// Clickable represents a clickable area.
|
||||
@@ -92,7 +92,7 @@ func (b *Clickable) History() []Press {
|
||||
// Layout and update the button state
|
||||
func (b *Clickable) Layout(gtx layout.Context) layout.Dimensions {
|
||||
b.update(gtx)
|
||||
defer pointer.Rect(image.Rectangle{Max: gtx.Constraints.Min}).Push(gtx.Ops).Pop()
|
||||
defer clip.Rect(image.Rectangle{Max: gtx.Constraints.Min}).Push(gtx.Ops).Pop()
|
||||
b.click.Add(gtx.Ops)
|
||||
for len(b.history) > 0 {
|
||||
c := b.history[0]
|
||||
|
||||
Reference in New Issue
Block a user