summaryrefslogtreecommitdiffstats
path: root/tests/auto/uiloader
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@trolltech.com>2009-09-04 10:44:30 +0200
committerOlivier Goffart <ogoffart@trolltech.com>2009-09-04 12:56:00 +0200
commitb35d0b78dd9212a1db45b07e63a8ec573ec2ecd7 (patch)
treec75254e1b9ffb2d07bde2752bd9af463e6d0cf8b /tests/auto/uiloader
parentf87b5e49bb3903676a57a69b9bbe1743141926c8 (diff)
Stylesheet: Do not crop the text in tabs
Because we did not reiimplement SE_TabBarTabText to force the parentstyle to call the virtual function back, we got the normal style margins in addition to the one by the stylesheet. Also added test for !hasNativeBorder to suport cases where we just specify a border Reviewed-by: jbache Task-number: 196326
Diffstat (limited to 'tests/auto/uiloader')
-rw-r--r--tests/auto/uiloader/baseline/css_tab_border.ui104
1 files changed, 104 insertions, 0 deletions
diff --git a/tests/auto/uiloader/baseline/css_tab_border.ui b/tests/auto/uiloader/baseline/css_tab_border.ui
new file mode 100644
index 0000000000..cefb9d8fd9
--- /dev/null
+++ b/tests/auto/uiloader/baseline/css_tab_border.ui
@@ -0,0 +1,104 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>Form</class>
+ <widget class="QWidget" name="Form">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>379</width>
+ <height>277</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>Form</string>
+ </property>
+ <property name="styleSheet">
+ <string notr="true">#tabWidget QTabBar::tab {
+ background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
+ stop: 0 #E1E1E1, stop: 0.4 #DDDDDD,
+ stop: 0.5 #D8D8D8, stop: 1.0 #D3D3D3);
+ border: 2px solid #C4C4C3;
+ border-bottom-color: #C2C7CB; /* same as the pane color */
+ border-top-left-radius: 4px;
+ border-top-right-radius: 4px;
+ padding: 2px;
+ }
+
+#tabWidget_2 QTabBar::tab {
+ border: 3px solid red;
+ }
+
+#tabWidget_3 QTabBar::tab {
+ margin: 5px;
+ }
+
+
+</string>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <item>
+ <widget class="QTabWidget" name="tabWidget">
+ <property name="currentIndex">
+ <number>1</number>
+ </property>
+ <property name="tabsClosable">
+ <bool>true</bool>
+ </property>
+ <widget class="QWidget" name="tab">
+ <attribute name="title">
+ <string>Tab 1</string>
+ </attribute>
+ </widget>
+ <widget class="QWidget" name="tab_2">
+ <attribute name="title">
+ <string>Tab 2</string>
+ </attribute>
+ </widget>
+ </widget>
+ </item>
+ <item>
+ <widget class="QTabWidget" name="tabWidget_2">
+ <property name="currentIndex">
+ <number>1</number>
+ </property>
+ <property name="tabsClosable">
+ <bool>false</bool>
+ </property>
+ <widget class="QWidget" name="tab_3">
+ <attribute name="title">
+ <string>Tab 1</string>
+ </attribute>
+ </widget>
+ <widget class="QWidget" name="tab_4">
+ <attribute name="title">
+ <string>Tab 2</string>
+ </attribute>
+ </widget>
+ </widget>
+ </item>
+ <item>
+ <widget class="QTabWidget" name="tabWidget_3">
+ <property name="currentIndex">
+ <number>1</number>
+ </property>
+ <property name="tabsClosable">
+ <bool>true</bool>
+ </property>
+ <widget class="QWidget" name="tab_5">
+ <attribute name="title">
+ <string>Tab 1</string>
+ </attribute>
+ </widget>
+ <widget class="QWidget" name="tab_6">
+ <attribute name="title">
+ <string>Tab 2</string>
+ </attribute>
+ </widget>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>