diff options
author | mae <qt-info@nokia.com> | 2010-07-16 09:42:16 (GMT) |
---|---|---|
committer | Jesper Thomschutz <jesper.thomschutz@nokia.com> | 2010-08-12 08:20:28 (GMT) |
commit | 141963b1c66fe530e55e185f4889ef80c9234d1e (patch) | |
tree | d7928e25d295e79aa66137ca6f040ff497763176 | |
parent | 8da0be0dd2cffe739733f53500b1fc5d8ac4a49a (diff) | |
download | Qt-141963b1c66fe530e55e185f4889ef80c9234d1e.zip Qt-141963b1c66fe530e55e185f4889ef80c9234d1e.tar.gz Qt-141963b1c66fe530e55e185f4889ef80c9234d1e.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
(cherry picked from commit 975b1913e44128a3e9b9055f9bf2ff40d86adf2a)
-rw-r--r-- | src/gui/text/qtextlayout.cpp | 2 |
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) { |