diff options
author | Tang Haixiang <tanghaixiang@uniontech.com> | 2022-10-14 10:42:07 +0800 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2022-11-11 07:41:39 +0100 |
commit | de16300661bc498eb02d8d5b36ccc07ebe595ca2 (patch) | |
tree | 13dc0b3c0ee34569c31e50d9fabc4a20aa9c00de /tests/auto/other | |
parent | df82396123350b67c4696673eea09d3cec995ae9 (diff) |
QTextLayout: Reconsider cursor drawing on TextObject
Revert: e99a883bd382ca950192bd66cafb2a1de6394ce7
Revert: 33238ea2c63b372ee8795eaafbfc5a859a778f8d
These two commits made the drawing of the cursor incomprehensible,
but their purpose was to fix the problem of abnormal cursor drawing
when QScriptAnalysis::Object is present. Because objects require
some special handling, they can be specially aligned or floated.
Anyway, the alignment is already reflected by ascent and descent,
and when drawing, y = position.y() + (sl.y + sl.base() - base).toReal();
works fine. So roll them back now.
We just need to specially consider the case where the QScriptItem is a
QScriptAnalysis::Object, keeping the base and descent the same as the row.
Task-number: QTBUG-92468
Task-number: QTBUG-86823
Task-number: QTBUG-96288
Pick-to: 6.2 6.4
Change-Id: I6d9a0e00fbc3823e0cc8e0e8bd061da5782d1f8a
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'tests/auto/other')
0 files changed, 0 insertions, 0 deletions