summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eblomfel@trolltech.com>2009-05-19 15:03:46 (GMT)
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2010-01-14 12:45:37 (GMT)
commite3723b2609a5beb10f58690bb58a236a95b1e743 (patch)
tree297c2b60a66a5738af564b34505e7dd1bcffc256 /src
parent26372057d92564da9baf6d17c685fd1b22ff4b8a (diff)
downloadQt-e3723b2609a5beb10f58690bb58a236a95b1e743.zip
Qt-e3723b2609a5beb10f58690bb58a236a95b1e743.tar.gz
Qt-e3723b2609a5beb10f58690bb58a236a95b1e743.tar.bz2
Fix position of QStaticText text
To mirror the behavior of drawText() the y-position origin should be the baseline of the text.
Diffstat (limited to 'src')
-rw-r--r--src/gui/text/qstatictext.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/text/qstatictext.cpp b/src/gui/text/qstatictext.cpp
index bb83fd1..b3edde6 100644
--- a/src/gui/text/qstatictext.cpp
+++ b/src/gui/text/qstatictext.cpp
@@ -70,7 +70,7 @@ void QStaticTextPrivate::init(const QString &text, const QFont &font)
QFontMetrics fontMetrics(font);
textLayout->beginLayout();
- int h = fontMetrics.ascent();
+ int h = -fontMetrics.ascent();
QTextLine line;
if ((line = textLayout->createLine()).isValid()) {
line.setLineWidth(fontMetrics.width(text));