summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamuel Rødal <samuel.rodal@digia.com>2012-11-20 12:46:04 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-11-20 14:13:07 +0100
commitb8341127c03f9b6297c6d8ff47e98380677de9aa (patch)
tree75ebd20330a7d59b13692b355190c46f645ea2f9
parentbf909bd637e4910a75b60df3b3ca5f2dd79515e4 (diff)
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>
-rw-r--r--src/gui/text/qtextlayout.cpp2
1 files changed, 1 insertions, 1 deletions
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) {