diff options
author | Samuel Rødal <sroedal@trolltech.com> | 2009-04-21 10:08:17 (GMT) |
---|---|---|
committer | Samuel Rødal <sroedal@trolltech.com> | 2009-04-21 10:13:52 (GMT) |
commit | 57f8033b7c1b26dfc91e257d1aaf9266ae67cc8d (patch) | |
tree | 4d4ec76646afb9b136350c774795b706913ab46d /src | |
parent | be7ee29e4b40d2496041873bba753761a6d7b8c4 (diff) | |
download | Qt-57f8033b7c1b26dfc91e257d1aaf9266ae67cc8d.zip Qt-57f8033b7c1b26dfc91e257d1aaf9266ae67cc8d.tar.gz Qt-57f8033b7c1b26dfc91e257d1aaf9266ae67cc8d.tar.bz2 |
Fix non-opaque text from widget palette being blitted, not blended.
QPainter inherits some properties from the widget, among other font and
pen. These are set in the painter's state in initFrom(), but in 4.5 we
forgot to call QPaintEngineEx::penChanged() to let an extended paint
engine know that the pen has changed. This caused the raster engine to
believe it could blit non-opaque text, due to the fast_text flag not
being correctly updated.
Task-number: 251534
Reviewed-by: Paul
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/painting/qpainter.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp index 2fa6a56..ffb273e 100644 --- a/src/gui/painting/qpainter.cpp +++ b/src/gui/painting/qpainter.cpp @@ -1484,7 +1484,9 @@ void QPainter::initFrom(const QWidget *widget) d->state->bgBrush = pal.brush(widget->backgroundRole()); d->state->deviceFont = QFont(widget->font(), const_cast<QWidget*> (widget)); d->state->font = d->state->deviceFont; - if (d->engine) { + if (d->extended) { + d->extended->penChanged(); + } else if (d->engine) { d->engine->setDirty(QPaintEngine::DirtyPen); d->engine->setDirty(QPaintEngine::DirtyBrush); d->engine->setDirty(QPaintEngine::DirtyFont); |