diff options
author | Andrew den Exter <andrew.den-exter@nokia.com> | 2012-03-26 15:54:16 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-04-17 01:24:38 +0200 |
commit | b20df2bf54aec02f46d960868562cf1b100d455c (patch) | |
tree | f883cb58b24af39921fbe8f20d9d1599c9d350af /src/quick/items/qquicktext_p_p.h | |
parent | 9606b1b66721e6296d06fca343f4f2d6ffb8419a (diff) |
Fix Text baselineOffset caclulations.
Update the baselineOffset when short cutting layout due to an empty
text property. And allow alterations to the baseline due to images,
font scaling and custom layouts when doing a layout.
Task-number: QTBUG-24303
Change-Id: I5a31a6108cded490fef8b0674e15558ea4e22d6b
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
Diffstat (limited to 'src/quick/items/qquicktext_p_p.h')
-rw-r--r-- | src/quick/items/qquicktext_p_p.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/quick/items/qquicktext_p_p.h b/src/quick/items/qquicktext_p_p.h index 0425c37406..cfa37789cc 100644 --- a/src/quick/items/qquicktext_p_p.h +++ b/src/quick/items/qquicktext_p_p.h @@ -75,6 +75,7 @@ public: ~QQuickTextPrivate(); void init(); + void updateBaseline(qreal baseline, qreal dy); void updateSize(); void updateLayout(); bool determineHorizontalAlignment(); @@ -163,7 +164,7 @@ public: void ensureDoc(); - QRectF setupTextLayout(qreal *const naturalWidth); + QRectF setupTextLayout(qreal *const naturalWidth, qreal * const baseline); void setupCustomLineGeometry(QTextLine &line, qreal &height, int lineOffset = 0); bool isLinkActivatedConnected(); QString anchorAt(const QPointF &pos); |