diff options
author | Andy Shaw <andy.shaw@digia.com> | 2015-01-23 15:51:48 +0100 |
---|---|---|
committer | Andy Shaw <andy.shaw@digia.com> | 2015-01-23 15:58:15 +0100 |
commit | 1bb05c4daa070a714d651ec7eac289f627560a47 (patch) | |
tree | 14dd28d72647b79f39bc37715fdf49369e75becb /src/gui | |
parent | a4a45d7bed8f2f62cac879d3fd29edebe8d5e453 (diff) |
Keep the width as it is to ensure the underline is drawn correctly
When the width of the decoration was floored then in some circumstances
(such as when latin and Hangul text was mixed) an underline of the text
would appear to be broken on HiDpi screens. Since the width is correct
then we should keep it as it is to ensure it meets up correctly.
Task-number: QTBUG-44062
Change-Id: I2cbf722a9cf9c7e15caa9aad061bf28d3bd0bb59
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/painting/qpainter.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp index b99a32df27..c923b3b22a 100644 --- a/src/gui/painting/qpainter.cpp +++ b/src/gui/painting/qpainter.cpp @@ -6204,7 +6204,7 @@ static void drawTextItemDecoration(QPainter *painter, const QPointF &pos, const pen.setWidthF(fe->lineThickness().toReal()); pen.setCapStyle(Qt::FlatCap); - QLineF line(pos.x(), pos.y(), pos.x() + qFloor(width), pos.y()); + QLineF line(pos.x(), pos.y(), pos.x() + width, pos.y()); bool wasCompatiblePainting = painter->renderHints() & QPainter::Qt4CompatiblePainting; |