mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-02 16:06:19 +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
@@ -4,8 +4,8 @@ import (
|
||||
"image"
|
||||
|
||||
"gioui.org/gesture"
|
||||
"gioui.org/io/pointer"
|
||||
"gioui.org/layout"
|
||||
"gioui.org/op/clip"
|
||||
)
|
||||
|
||||
type Enum struct {
|
||||
@@ -43,7 +43,7 @@ func (e *Enum) Hovered() (string, bool) {
|
||||
|
||||
// Layout adds the event handler for key.
|
||||
func (e *Enum) Layout(gtx layout.Context, key string) layout.Dimensions {
|
||||
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()
|
||||
|
||||
if index(e.values, key) == -1 {
|
||||
e.values = append(e.values, key)
|
||||
|
||||
Reference in New Issue
Block a user