diff options
author | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com> | 2011-08-24 07:41:29 (GMT) |
---|---|---|
committer | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com> | 2011-08-24 07:48:20 (GMT) |
commit | 00561c990b6a55de616267637fd3e772d4f10efe (patch) | |
tree | fd1bb460ee3cfd4bd1eb8a0a21909a98286fea62 | |
parent | 1a8a36eb6b6df9e2550b5eaa4606f2d411fd4294 (diff) | |
download | Qt-00561c990b6a55de616267637fd3e772d4f10efe.zip Qt-00561c990b6a55de616267637fd3e772d4f10efe.tar.gz Qt-00561c990b6a55de616267637fd3e772d4f10efe.tar.bz2 |
Revert "Include trailing space width in RTL text line width"
This reverts commit 2fa986aa670bee0fafb30241f40bb3556594e32b.
The fix was wrong. Use the IncludeTrailingSpaces flag if you want
to include the trailing spaces in the text width.
Reviewed-by: Jiang Jiang
-rw-r--r-- | src/gui/text/qtextlayout.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/gui/text/qtextlayout.cpp b/src/gui/text/qtextlayout.cpp index 515915a..4fd6ddf 100644 --- a/src/gui/text/qtextlayout.cpp +++ b/src/gui/text/qtextlayout.cpp @@ -1928,12 +1928,8 @@ found: if (line.textWidth > 0 && item < eng->layoutData->items.size()) eng->maxWidth += lbh.spaceData.textWidth; - // In the latter case, text are drawn with trailing spaces at the beginning - // of a line, so the naturalTextWidth should contain the space width - if ((eng->option.flags() & QTextOption::IncludeTrailingSpaces) || - (line.width == QFIXED_MAX && eng->isRightToLeft())) { + if (eng->option.flags() & QTextOption::IncludeTrailingSpaces) line.textWidth += lbh.spaceData.textWidth; - } if (lbh.spaceData.length) { line.length += lbh.spaceData.length; line.hasTrailingSpaces = true; |