summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2016-09-29 13:00:33 +0200
committerJ-P Nurmi <jpnurmi@qt.io>2016-09-29 17:12:51 +0000
commit84d3a064d7ab331c42ec1ced6e658a8bcc32f0f7 (patch)
tree443d95992e6f61e7cfa224b7bb74cb90d2b0fc8c /src
parent7b84962c47c9618af49526e3a2ef8c1c969d5aaa (diff)
QQuickText: fix paddings when wrapping or eliding is used
Change-Id: I8ec8c8eff41e77225ef42f7bd9e52f4558d00130 Task-number: QTBUG-55779 Reviewed-by: Liang Qi <liang.qi@qt.io>
Diffstat (limited to 'src')
-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 ea2d2f3133..044e6ce8c1 100644
--- a/src/quick/items/qquicktext.cpp
+++ b/src/quick/items/qquicktext.cpp
@@ -921,7 +921,7 @@ QRectF QQuickTextPrivate::setupTextLayout(qreal *const baseline)
bool wasInLayout = internalWidthUpdate;
internalWidthUpdate = true;
- q->setImplicitHeight(naturalHeight);
+ q->setImplicitHeight(naturalHeight + q->topPadding() + q->bottomPadding());
internalWidthUpdate = wasInLayout;
multilineElide = elideMode == QQuickText::ElideRight