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>bb10
parent
a4a45d7bed
commit
1bb05c4daa
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue