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 <eskil.abrahamsen-blomfeldt@digia.com>
This commit is contained in:
Samuel Rødal 2012-11-20 12:46:04 +01:00 committed by The Qt Project
parent bf909bd637
commit b8341127c0

View File

@ -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) {