summaryrefslogtreecommitdiffstats
path: root/src/gui/text
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-02-10 22:25:20 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-02-10 22:25:20 (GMT)
commitc0179a6f640a3a88550656884d0bb5065e6b048a (patch)
treeb19a62cb18bb73ab9c9ec848ccf2195d87251786 /src/gui/text
parentc1be5360025d9620d731e920300a75459a1eb503 (diff)
parent1407f3c1815addf6b9cac7503d38b670bbeab895 (diff)
downloadQt-c0179a6f640a3a88550656884d0bb5065e6b048a.zip
Qt-c0179a6f640a3a88550656884d0bb5065e6b048a.tar.gz
Qt-c0179a6f640a3a88550656884d0bb5065e6b048a.tar.bz2
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.6-integration
* '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1: Fix the WebKit build Blinking cursors are 2 pixels wide on Mac OS X/Cocoa. Fixed compilation with QT_NO_WHEELEVENT Take into account the solaris-cc-64-stlport mkspec Updated WebKit from /home/shausman/src/webkit/trunk to qtwebkit/qtwebkit-4.6 ( ffae5e11181a3961193fa21ea405851cad714d4b )
Diffstat (limited to 'src/gui/text')
-rw-r--r--src/gui/text/qtextlayout.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gui/text/qtextlayout.cpp b/src/gui/text/qtextlayout.cpp
index 26c7c1e..af91603 100644
--- a/src/gui/text/qtextlayout.cpp
+++ b/src/gui/text/qtextlayout.cpp
@@ -1331,7 +1331,7 @@ void QTextLayout::drawCursor(QPainter *p, const QPointF &pos, int cursorPosition
QTextLine l(line, d);
const QScriptLine &sl = d->lines[line];
- const qreal x = position.x() + l.cursorToX(cursorPosition);
+ qreal x = position.x() + l.cursorToX(cursorPosition);
int itm = d->findItem(cursorPosition - 1);
QFixed base = sl.base();
@@ -1350,6 +1350,10 @@ void QTextLayout::drawCursor(QPainter *p, const QPointF &pos, int cursorPosition
&& (p->transform().type() > QTransform::TxTranslate);
if (toggleAntialiasing)
p->setRenderHint(QPainter::Antialiasing);
+#if defined(QT_MAC_USE_COCOA)
+ // Always draw the cursor aligned to pixel boundary.
+ x = qRound(x);
+#endif
p->fillRect(QRectF(x, y, qreal(width), (base + descent + 1).toReal()), p->pen().brush());
if (toggleAntialiasing)
p->setRenderHint(QPainter::Antialiasing, false);