summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorC. Boemann <cbo@boemann.dk>2012-01-10 20:09:58 +0100
committerQt by Nokia <qt-info@nokia.com>2012-01-17 14:44:30 +0100
commitefc355e8ed5bf17c5d31ac92728048b8f6706993 (patch)
tree8bd0d5a04ca1a18b557eb5fba265a413928ef21f
parentbf805455d40b4445f61321439d529cd85cb6bc65 (diff)
Fix that right aligned tabs can cause text overlapping
Eventhough there is a unittest that shows it shouldn't overlap it does at drawing. I've not been able to figure out why the unittet doesn't fail, but it has before been the case that layout and drawing don't correspond. Change-Id: I13250d0510cd0d963721b05f67ac82b1d499fbac Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
-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 0dd8d0bef3..b218e2aae5 100644
--- a/src/gui/text/qtextengine.cpp
+++ b/src/gui/text/qtextengine.cpp
@@ -2526,7 +2526,7 @@ QFixed QTextEngine::calculateTabWidth(int item, QFixed x) const
// fall through
case QTextOption::RightTab:
tab = QFixed::fromReal(tabSpec.position) * dpiScale - length;
- if (tab < 0) // default to tab taking no space
+ if (tab < x) // default to tab taking no space
return QFixed();
break;
case QTextOption::LeftTab: