aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@qt.io>2021-12-13 21:41:34 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2022-01-06 19:20:32 +0000
commit048a913934996936c59b464a79107459098fb765 (patch)
treed74b70a1cc9abac514bf8ceba5726e243e422356 /tools
parent1c0aaf2f62e33cb4ec610214132a2efbe73f9d22 (diff)
TextEdit: hide cursor outside viewport if ItemObservesViewport
Given a TextEdit in a Flickable, when someone scrolls the text such that the text cursor is completely outside the viewport, we want the text cursor to be hidden. It is clipped if Flickable has clip: true, which is better for "pixel-perfect" clipping, but has a performance penalty. Anyway it still looked ridiculous in the case when clipping is not turned on, to have a stray text cursor appearing on top of some neighbor items, even though the text wasn't visible. To have awareness of the viewport (such as Flickable) within which it's shown, TextEdit has to opt-in with the ItemObservesViewport flag so that QQuickTextEditPrivate::transformChanged() will be called; the question is under what conditions. We already opt-in when the text is large; otherwise we don't really want to have updatePaintNode() called so often, unless other code opts in by setting that flag; because for short texts, the old way is more efficient (populate all the glyphs from the document into the scenegraph one time, and no need to update until editing happens). Task-number: QTBUG-83069 Change-Id: Idd7cc9d2369d67b967eec50fe81964e6abe84e9c Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> (cherry picked from commit 308f3cbc1a00181e39db94e6329978d872d7b520) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'tools')
0 files changed, 0 insertions, 0 deletions