aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquicktext.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/quick/items/qquicktext.cpp')
-rw-r--r--src/quick/items/qquicktext.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/quick/items/qquicktext.cpp b/src/quick/items/qquicktext.cpp
index fbf46f51e4..b46f2e5ab9 100644
--- a/src/quick/items/qquicktext.cpp
+++ b/src/quick/items/qquicktext.cpp
@@ -2155,9 +2155,10 @@ void QQuickText::geometryChanged(const QRectF &newGeometry, const QRectF &oldGeo
if ((!widthChanged && !heightChanged) || d->internalWidthUpdate)
goto geomChangeDone;
- if (effectiveHAlign() != QQuickText::AlignLeft && widthChanged) {
+ if ((effectiveHAlign() != QQuickText::AlignLeft && widthChanged)
+ || vAlign() != QQuickText::AlignTop && heightChanged) {
// If the width has changed and we're not left aligned do an update so the text is
- // repositioned even if a full layout isn't required.
+ // repositioned even if a full layout isn't required. And the same for vertical.
d->updateType = QQuickTextPrivate::UpdatePaintNode;
update();
}