aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick
diff options
context:
space:
mode:
authorDominik Holland <dominik.holland@qt.io>2022-09-14 15:39:08 +0200
committerDominik Holland <dominik.holland@qt.io>2022-09-20 09:41:59 +0000
commit39da8512d7f00875d7148ef897cd22621c2eec3b (patch)
tree6550b95fdc31ae66fd9f25ca8cc12e5c482401c7 /src/quick
parent6f1b5d2f095b96e3fa82a0c88b7cf45493217671 (diff)
Text: Re-layout the text when a alignment is set and the height grows
When the top alignment (default) is used, a growing height can be ignored in some situations and no re-layout is needed. But once the alignment has been changed, the re-layout needs to happen, as otherwise not all anchors are updated correctly. Fixes: QTBUG-106594 Change-Id: I9ab9999f49331aadd3bb8247d520288c40b51b21 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io> (cherry picked from commit 4933bd6351feec988746af647c391c46483f049a) Reviewed-by: Dominik Holland <dominik.holland@qt.io>
Diffstat (limited to 'src/quick')
-rw-r--r--src/quick/items/qquicktext.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/quick/items/qquicktext.cpp b/src/quick/items/qquicktext.cpp
index 1e80020d9d..01f196a127 100644
--- a/src/quick/items/qquicktext.cpp
+++ b/src/quick/items/qquicktext.cpp
@@ -2419,7 +2419,7 @@ void QQuickText::geometryChange(const QRectF &newGeometry, const QRectF &oldGeom
goto geomChangeDone;
if (!(widthChanged || widthMaximum) && !d->isLineLaidOutConnected()) { // only height has changed
- if (newGeometry.height() > oldGeometry.height()) {
+ if (!verticalPositionChanged && newGeometry.height() > oldGeometry.height()) {
if (!d->heightExceeded && !qFuzzyIsNull(oldGeometry.height())) {
// Height is adequate and growing, and it wasn't 0 previously.
goto geomChangeDone;