summaryrefslogtreecommitdiff
path: root/src/gui/styles/qstylesheetstyle.cpp
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@trolltech.com>2009-09-10 18:25:46 +0200
committerOlivier Goffart <ogoffart@trolltech.com>2009-09-10 18:28:42 +0200
commitbe8c17034b99c5f52b5d885055493c405fd5eadb (patch)
tree11324b57672c383fc77730d2e7cd5487ddafb4c7 /src/gui/styles/qstylesheetstyle.cpp
parent29259d93691f0fc7790108c00a8718c07fa3ae5e (diff)
downloadqt4-tools-be8c17034b99c5f52b5d885055493c405fd5eadb.tar.gz
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/qstylesheetstyle.cpp')
-rw-r--r--src/gui/styles/qstylesheetstyle.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gui/styles/qstylesheetstyle.cpp b/src/gui/styles/qstylesheetstyle.cpp
index 49337b5a1c..9f2d2458b1 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);