aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquicktext_p_p.h
diff options
context:
space:
mode:
authorDaiwei Li <daiweili@suitabletech.com>2014-12-14 21:31:30 -0800
committerDaiwei Li <daiweili@suitabletech.com>2014-12-16 22:11:19 +0100
commit119508602ea5fcd6cce135e547e6aef9bb93beeb (patch)
tree8576cdcee295e9607c8443a8d4932eecc0852fd5 /src/quick/items/qquicktext_p_p.h
parent2a0d1cc3794394107652d979051cb050e4615a36 (diff)
Fix QQuickText alignment when lineHeight is set
Text is always aligned to the top of the lineHeight rectangle, and no offset is added when verticalAlignment is set to AlignVCenter or AlignBottom. This change adds an offset based on the lineHeight and font height in those cases. Task-number: QTBUG-42050 Change-Id: Ibc63c80d4178b0f5c498cc126156df828855fd76 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Diffstat (limited to 'src/quick/items/qquicktext_p_p.h')
-rw-r--r--src/quick/items/qquicktext_p_p.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/quick/items/qquicktext_p_p.h b/src/quick/items/qquicktext_p_p.h
index d645ce5ed5..35cdb68104 100644
--- a/src/quick/items/qquicktext_p_p.h
+++ b/src/quick/items/qquicktext_p_p.h
@@ -76,6 +76,7 @@ public:
bool isLineLaidOutConnected();
void setLineGeometry(QTextLine &line, qreal lineWidth, qreal &height);
+ int lineHeightOffset() const;
QString elidedText(qreal lineWidth, const QTextLine &line, QTextLine *nextLine = 0) const;
void elideFormats(int start, int length, int offset, QList<QTextLayout::FormatRange> *elidedFormats);