diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2011-09-27 00:20:24 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2011-09-27 00:20:24 (GMT) |
commit | d7489680a80df5d77fbc032b1bc656a8dab1a986 (patch) | |
tree | 57e8d94833275c2df28ad71dfa70f843498c243a /src/gui | |
parent | 2f86072e5daf318a2aa9d400f045eae9563b2ae6 (diff) | |
parent | ad7ddea09126efeb58ab626dc13113e3e1956912 (diff) | |
download | Qt-d7489680a80df5d77fbc032b1bc656a8dab1a986.zip Qt-d7489680a80df5d77fbc032b1bc656a8dab1a986.tar.gz Qt-d7489680a80df5d77fbc032b1bc656a8dab1a986.tar.bz2 |
Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-fire-staging into master-integration
* 'master' of scm.dev.nokia.troll.no:qt/qt-fire-staging:
Update changes-4.8.0 file
Only limit cursor position when line is wrapped
Make sure cursor position doesn't exceed line end
Allow shared EGL contexts for xcb and xlib platforms
Allow generic EGL platform contexts to be shared
4.8 Changes: OpenGL Framebuffer Format
stop tslib plugin having same file name as linux input plugin
Avoid unnecessary detach of a QImage in QPixmapDropShadowFilter
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/image/qpixmapfilter.cpp | 12 | ||||
-rw-r--r-- | src/gui/text/qtextlayout.cpp | 3 |
2 files changed, 8 insertions, 7 deletions
diff --git a/src/gui/image/qpixmapfilter.cpp b/src/gui/image/qpixmapfilter.cpp index a33e173..6c03990 100644 --- a/src/gui/image/qpixmapfilter.cpp +++ b/src/gui/image/qpixmapfilter.cpp @@ -1362,16 +1362,14 @@ void QPixmapDropShadowFilter::draw(QPainter *p, qt_blurImage(&blurPainter, tmp, d->radius, false, true); blurPainter.end(); - tmp = blurred; - // blacken the image... - tmpPainter.begin(&tmp); - tmpPainter.setCompositionMode(QPainter::CompositionMode_SourceIn); - tmpPainter.fillRect(tmp.rect(), d->color); - tmpPainter.end(); + QPainter blackenPainter(&blurred); + blackenPainter.setCompositionMode(QPainter::CompositionMode_SourceIn); + blackenPainter.fillRect(blurred.rect(), d->color); + blackenPainter.end(); // draw the blurred drop shadow... - p->drawImage(pos, tmp); + p->drawImage(pos, blurred); // Draw the actual pixmap... p->drawPixmap(pos, px, src); diff --git a/src/gui/text/qtextlayout.cpp b/src/gui/text/qtextlayout.cpp index d0c1a0e..a86cf05 100644 --- a/src/gui/text/qtextlayout.cpp +++ b/src/gui/text/qtextlayout.cpp @@ -2612,6 +2612,9 @@ qreal QTextLine::cursorToX(int *cursorPos, Edge edge) const x += eng->offsetInLigature(si, pos, end, glyph_pos); } + if (eng->option.wrapMode() != QTextOption::NoWrap && x > line.width) + x = line.width; + *cursorPos = pos + si->position; return x.toReal(); } |