diff options
author | Samuel Rødal <samuel.rodal@digia.com> | 2012-11-20 12:46:04 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2012-11-20 14:13:07 +0100 |
commit | b8341127c03f9b6297c6d8ff47e98380677de9aa (patch) | |
tree | 75ebd20330a7d59b13692b355190c46f645ea2f9 /src/gui/text/qtextlayout.cpp | |
parent | bf909bd637e4910a75b60df3b3ca5f2dd79515e4 (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>
Diffstat (limited to 'src/gui/text/qtextlayout.cpp')
-rw-r--r-- | src/gui/text/qtextlayout.cpp | 2 |
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) { |