diff options
author | Jiang Jiang <jiang.jiang@nokia.com> | 2011-03-23 15:51:41 (GMT) |
---|---|---|
committer | Jiang Jiang <jiang.jiang@nokia.com> | 2011-03-24 12:55:13 (GMT) |
commit | d2ab40f8c3ba0f13dc15ca8286afea291140d8ec (patch) | |
tree | 0b124f060812ed1fa88740ae59d4dee26b5c67d5 /src/gui | |
parent | c6646102288ccb3619895405f3ec42c5803a13b7 (diff) | |
download | Qt-d2ab40f8c3ba0f13dc15ca8286afea291140d8ec.zip Qt-d2ab40f8c3ba0f13dc15ca8286afea291140d8ec.tar.gz Qt-d2ab40f8c3ba0f13dc15ca8286afea291140d8ec.tar.bz2 |
qFloor the decoration line width before painting
It's a special case when enabling design (fractional) metrics,
we need to floor it to keep consistency with integer metrics.
Reviewed-by: Eskil
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 b1f5f4c..14fb772 100644 --- a/src/gui/painting/qpainter.cpp +++ b/src/gui/painting/qpainter.cpp @@ -6463,7 +6463,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() + width, pos.y()); + QLineF line(pos.x(), pos.y(), pos.x() + qFloor(width), pos.y()); const qreal underlineOffset = fe->underlinePosition().toReal(); // deliberately ceil the offset to avoid the underline coming too close to |