diff options
author | Olivier Goffart <ogoffart@trolltech.com> | 2009-09-10 16:25:46 (GMT) |
---|---|---|
committer | Olivier Goffart <ogoffart@trolltech.com> | 2009-09-10 16:28:42 (GMT) |
commit | be8c17034b99c5f52b5d885055493c405fd5eadb (patch) | |
tree | 11324b57672c383fc77730d2e7cd5487ddafb4c7 /src/gui/styles | |
parent | 29259d93691f0fc7790108c00a8718c07fa3ae5e (diff) | |
download | Qt-be8c17034b99c5f52b5d885055493c405fd5eadb.zip Qt-be8c17034b99c5f52b5d885055493c405fd5eadb.tar.gz Qt-be8c17034b99c5f52b5d885055493c405fd5eadb.tar.bz2 |
Fixes regression in QStyleSheet regarding QFrame:no-frame
In Qt know the frame is drawn in PE_Widget with stylesheet. But the
QStyleOption passed by QWidgetPrivate::drawBackground is really simple
and doesn't contains frame information.
We need to rely on the widget itself to know if we should look for the
:no-frame pseudo element.
Reviewed-by: jbache
Task-number: 261110
Diffstat (limited to 'src/gui/styles')
-rw-r--r-- | src/gui/styles/qstylesheetstyle.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gui/styles/qstylesheetstyle.cpp b/src/gui/styles/qstylesheetstyle.cpp index 49337b5..9f2d245 100644 --- a/src/gui/styles/qstylesheetstyle.cpp +++ b/src/gui/styles/qstylesheetstyle.cpp @@ -84,6 +84,7 @@ #include "qdrawutil.h" #include <limits.h> +#include <QtGui/qtoolbar.h> QT_BEGIN_NAMESPACE @@ -2013,7 +2014,10 @@ QRenderRule QStyleSheetStyle::renderRule(const QWidget *w, const QStyleOption *o } } else #endif - { } // required for the above ifdef'ery + if (const QFrame *frm = qobject_cast<const QFrame *>(w)) { + if (frm->lineWidth() == 0) + extraClass |= PseudoClass_Frameless; + } } return renderRule(w, pseudoElement, pseudoClass(state) | extraClass); |