summaryrefslogtreecommitdiffstats
path: root/tests/auto/uiloader
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@trolltech.com>2009-09-10 16:25:46 (GMT)
committerOlivier Goffart <ogoffart@trolltech.com>2009-09-10 16:28:42 (GMT)
commitbe8c17034b99c5f52b5d885055493c405fd5eadb (patch)
tree11324b57672c383fc77730d2e7cd5487ddafb4c7 /tests/auto/uiloader
parent29259d93691f0fc7790108c00a8718c07fa3ae5e (diff)
downloadQt-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 'tests/auto/uiloader')
-rw-r--r--tests/auto/uiloader/baseline/css_frames.ui45
1 files changed, 28 insertions, 17 deletions
diff --git a/tests/auto/uiloader/baseline/css_frames.ui b/tests/auto/uiloader/baseline/css_frames.ui
index 92ecee1..d1397bb 100644
--- a/tests/auto/uiloader/baseline/css_frames.ui
+++ b/tests/auto/uiloader/baseline/css_frames.ui
@@ -33,22 +33,16 @@ border: 5px solid white;
#line1, #line2 {
border: 1px solid rgb(170, 85, 255);
}
+
+
+QFrame::no-frame {
+ background: orange;
+ border-color: #000;
+ }
+
</string>
</property>
<layout class="QGridLayout" name="gridLayout">
- <item row="0" column="0">
- <widget class="QLabel" name="label">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Expanding">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>This test that all the frame style can handle margins and paddings correctly</string>
- </property>
- </widget>
- </item>
<item row="1" column="0">
<widget class="QGroupBox" name="groupBox">
<property name="title">
@@ -99,7 +93,7 @@ border: 5px solid white;
<item>
<widget class="QFrame" name="frame_2">
<property name="frameShape">
- <enum>QFrame::Box</enum>
+ <enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
@@ -171,7 +165,7 @@ border: 5px solid white;
<item>
<widget class="QFrame" name="frame_4">
<property name="frameShape">
- <enum>QFrame::Box</enum>
+ <enum>QFrame::StyledPanel</enum>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
@@ -204,7 +198,7 @@ border: 5px solid white;
<item>
<widget class="QFrame" name="frame_3">
<property name="frameShape">
- <enum>QFrame::Panel</enum>
+ <enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
@@ -240,7 +234,7 @@ border: 5px solid white;
<item>
<widget class="QFrame" name="frame_5">
<property name="frameShape">
- <enum>QFrame::WinPanel</enum>
+ <enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Sunken</enum>
@@ -301,6 +295,23 @@ border: 5px solid white;
</property>
</widget>
</item>
+ <item row="0" column="0">
+ <widget class="QLabel" name="label">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="lineWidth">
+ <number>0</number>
+ </property>
+ <property name="text">
+ <string>This test that all the frame style can handle margins and paddings correctly
+ (and the background of this label should be orange)</string>
+ </property>
+ </widget>
+ </item>
</layout>
</widget>
<resources/>