From b8341127c03f9b6297c6d8ff47e98380677de9aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Tue, 20 Nov 2012 12:46:04 +0100 Subject: Fixed rendering artifacts when drawing cursor. Get rid of the + 1 in addition to the ascent and descent. Task-number: QTBUG-27658 Change-Id: I8721226a034099ebe348cad3c49ac711c7fe44b9 Reviewed-by: Eskil Abrahamsen Blomfeldt --- src/gui/text/qtextlayout.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/gui') diff --git a/src/gui/text/qtextlayout.cpp b/src/gui/text/qtextlayout.cpp index 0ca8e8d9a6..6b30e6ab65 100644 --- a/src/gui/text/qtextlayout.cpp +++ b/src/gui/text/qtextlayout.cpp @@ -1307,7 +1307,7 @@ void QTextLayout::drawCursor(QPainter *p, const QPointF &pos, int cursorPosition && (p->transform().type() > QTransform::TxTranslate); if (toggleAntialiasing) p->setRenderHint(QPainter::Antialiasing); - p->fillRect(QRectF(x, y, qreal(width), (base + descent + 1).toReal()), p->pen().brush()); + p->fillRect(QRectF(x, y, qreal(width), (base + descent).toReal()), p->pen().brush()); if (toggleAntialiasing) p->setRenderHint(QPainter::Antialiasing, false); if (d->layoutData->hasBidi) { -- cgit v1.2.3