summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJiang Jiang <jiang.jiang@nokia.com>2011-07-14 07:40:12 (GMT)
committerJiang Jiang <jiang.jiang@nokia.com>2011-07-14 07:40:12 (GMT)
commit705416cdc8ee91ac88d80298dbe2971a9384c196 (patch)
treebb4b85f24c895de6f8aba35692795caf87167247
parentfb4903c4eca6a085c4c39078c11de03f5791f08e (diff)
downloadQt-705416cdc8ee91ac88d80298dbe2971a9384c196.zip
Qt-705416cdc8ee91ac88d80298dbe2971a9384c196.tar.gz
Qt-705416cdc8ee91ac88d80298dbe2971a9384c196.tar.bz2
Apply 57993ba7 properly to 4.8
Because we have moved alignLine from qtextlayout.cpp to QTextEngine, this patch has to be applied manually. Reviewed-by: TrustMe
-rw-r--r--src/gui/text/qtextengine.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/text/qtextengine.cpp b/src/gui/text/qtextengine.cpp
index db50bdf..d92c418 100644
--- a/src/gui/text/qtextengine.cpp
+++ b/src/gui/text/qtextengine.cpp
@@ -2808,7 +2808,7 @@ QFixed QTextEngine::alignLine(const QScriptLine &line)
if (align & Qt::AlignRight)
x = line.width - (line.textAdvance + leadingSpaceWidth(line));
else if (align & Qt::AlignHCenter)
- x = (line.width - (line.textAdvance + leadingSpaceWidth(line)))/2;
+ x = (line.width - line.textAdvance)/2 - leadingSpaceWidth(line);
}
return x;
}