diff options
author | Yoann Lopes <yoann.lopes@nokia.com> | 2009-12-02 14:31:09 (GMT) |
---|---|---|
committer | Yoann Lopes <yoann.lopes@nokia.com> | 2009-12-02 14:31:09 (GMT) |
commit | ccde429536ba29dceb1576b6b981a812b0b846fc (patch) | |
tree | 3bdf0ab86eb7f9c074c9cf2dfb9b93a2b4e368df /src | |
parent | 25023911295c201758faaa2c800b2388ddf1e0b0 (diff) | |
download | Qt-ccde429536ba29dceb1576b6b981a812b0b846fc.zip Qt-ccde429536ba29dceb1576b6b981a812b0b846fc.tar.gz Qt-ccde429536ba29dceb1576b6b981a812b0b846fc.tar.bz2 |
Fixes transformation problems with QGraphicsProxyWidget.
In the paintEvent of the widget used in a QGraphicsProxyWidget, the worldMatrix was wrongly used by the painter instead of the deviceMatrix.
Similar problem in the WindowsXP Style, the worldMatrix was used instead of the deviceMatrix for determining if the widget is transformed (reviewed by eblomfel).
Task-number: QTBUG-5939
Reviewed-by: bnilsen
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/painting/qpainter.cpp | 2 | ||||
-rw-r--r-- | src/gui/styles/qwindowsxpstyle.cpp | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp index 443c9c5..30f8c9e 100644 --- a/src/gui/painting/qpainter.cpp +++ b/src/gui/painting/qpainter.cpp @@ -284,7 +284,7 @@ bool QPainterPrivate::attachPainterPrivate(QPainter *q, QPaintDevice *pdev) // Update matrix. if (q->d_ptr->state->WxF) { - q->d_ptr->state->redirectionMatrix *= q->d_ptr->state->worldMatrix; + q->d_ptr->state->redirectionMatrix = q->d_ptr->state->matrix; q->d_ptr->state->redirectionMatrix.translate(-offset.x(), -offset.y()); q->d_ptr->state->worldMatrix = QTransform(); q->d_ptr->state->WxF = false; diff --git a/src/gui/styles/qwindowsxpstyle.cpp b/src/gui/styles/qwindowsxpstyle.cpp index fe7f5d7..0767083 100644 --- a/src/gui/styles/qwindowsxpstyle.cpp +++ b/src/gui/styles/qwindowsxpstyle.cpp @@ -623,8 +623,7 @@ void QWindowsXPStylePrivate::drawBackground(XPThemeData &themeData) painter->save(); - QMatrix m = painter->matrix(); - bool complexXForm = m.m11() != 1.0 || m.m22() != 1.0 || m.m12() != 0.0 || m.m21() != 0.0; + bool complexXForm = painter->deviceTransform().type() > QTransform::TxTranslate; bool translucentToplevel = false; QPaintDevice *pdev = painter->device(); |