summaryrefslogtreecommitdiffstats
path: root/src/gui/text
diff options
context:
space:
mode:
authormae <qt-info@nokia.com>2010-07-16 09:42:16 (GMT)
committermae <qt-info@nokia.com>2010-07-16 09:43:46 (GMT)
commit975b1913e44128a3e9b9055f9bf2ff40d86adf2a (patch)
tree3d85e023d8cfbfd65794d1c467347a476567d7cd /src/gui/text
parent1ea53e6055a7c4e9677a5003725785ad503bb242 (diff)
downloadQt-975b1913e44128a3e9b9055f9bf2ff40d86adf2a.zip
Qt-975b1913e44128a3e9b9055f9bf2ff40d86adf2a.tar.gz
Qt-975b1913e44128a3e9b9055f9bf2ff40d86adf2a.tar.bz2
Fix RightBearing confusion in text layout
Negative RightBearing was wrongly taken into account when calculating the line wrap Reviewed-by: Eskil Abrahamsen Blomfeldt
Diffstat (limited to 'src/gui/text')
-rw-r--r--src/gui/text/qtextlayout.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/text/qtextlayout.cpp b/src/gui/text/qtextlayout.cpp
index d6535ea..674064e 100644
--- a/src/gui/text/qtextlayout.cpp
+++ b/src/gui/text/qtextlayout.cpp
@@ -1935,7 +1935,7 @@ void QTextLine::layout_helper(int maxGlyphs)
// We ignore the right bearing if the minimum negative bearing is too little to
// expand the text beyond the edge.
if (sb_or_ws|breakany) {
- if (lbh.calculateNewWidth(line) + lbh.minimumRightBearing > line.width)
+ if (lbh.calculateNewWidth(line) - lbh.minimumRightBearing > line.width)
lbh.adjustRightBearing();
if (lbh.checkFullOtherwiseExtend(line)) {
if (!breakany) {