mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-01 07:35:40 +00:00
widget: include the Editor key handler in the editor clip area
A meaningful clip area for a key handler will matter when we start auto-scrolling to move focused handlers into view. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
+2
-2
@@ -623,14 +623,14 @@ func (e *Editor) layout(gtx layout.Context, content layout.Widget) layout.Dimens
|
||||
e.scrollToCaret()
|
||||
}
|
||||
|
||||
defer clip.Rect(image.Rectangle{Max: e.viewSize}).Push(gtx.Ops).Pop()
|
||||
pointer.CursorText.Add(gtx.Ops)
|
||||
key.InputOp{Tag: &e.eventKey, Hint: e.InputHint}.Add(gtx.Ops)
|
||||
if e.requestFocus {
|
||||
key.FocusOp{Tag: &e.eventKey}.Add(gtx.Ops)
|
||||
key.SoftKeyboardOp{Show: true}.Add(gtx.Ops)
|
||||
}
|
||||
e.requestFocus = false
|
||||
defer clip.Rect(image.Rectangle{Max: e.viewSize}).Push(gtx.Ops).Pop()
|
||||
pointer.CursorText.Add(gtx.Ops)
|
||||
|
||||
var scrollRange image.Rectangle
|
||||
if e.SingleLine {
|
||||
|
||||
Reference in New Issue
Block a user