mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-01 07:35:40 +00:00
app,io/pointer: [API] remove CursorNameOp and rename CursorName -> Cursor
It's now possible to directly user pointer.Cursor to add to the ops. pointer.CursorText.Add(gtx.Ops) This is an API change. Use pointer.Cursor directly instead of CursorNameOp. Signed-off-by: Egon Elbre <egonelbre@gmail.com>
This commit is contained in:
@@ -93,7 +93,7 @@ func (d *Decorations) LayoutResize(gtx layout.Context, actions system.Action) {
|
||||
}
|
||||
st := clip.Rect(data.Rectangle).Push(gtx.Ops)
|
||||
if rsz.Hover.Hovered(gtx) {
|
||||
pointer.CursorNameOp{Name: action.CursorName()}.Add(gtx.Ops)
|
||||
action.Cursor().Add(gtx.Ops)
|
||||
}
|
||||
rsz.Drag.Add(gtx.Ops)
|
||||
pass := pointer.PassOp{}.Push(gtx.Ops)
|
||||
|
||||
+1
-1
@@ -626,7 +626,7 @@ func (e *Editor) layout(gtx layout.Context, content layout.Widget) layout.Dimens
|
||||
}
|
||||
e.requestFocus = false
|
||||
defer clip.Rect(image.Rectangle{Max: e.viewSize}).Push(gtx.Ops).Pop()
|
||||
pointer.CursorNameOp{Name: pointer.CursorText}.Add(gtx.Ops)
|
||||
pointer.CursorText.Add(gtx.Ops)
|
||||
|
||||
var scrollRange image.Rectangle
|
||||
if e.SingleLine {
|
||||
|
||||
Reference in New Issue
Block a user