From 1bb05c4daa070a714d651ec7eac289f627560a47 Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Fri, 23 Jan 2015 15:51:48 +0100 Subject: 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 --- src/gui/painting/qpainter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/gui') 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; -- cgit v1.2.3