diff options
author | Olivier Goffart <ogoffart@trolltech.com> | 2009-11-02 13:07:15 (GMT) |
---|---|---|
committer | Olivier Goffart <ogoffart@trolltech.com> | 2009-11-02 13:22:25 (GMT) |
commit | e6da35f6055d3ae7acf38d89456d3047f055a9cd (patch) | |
tree | 7751a377e136634f2dfd127df49b785560fbdcaf /tests/auto/uiloader/baseline | |
parent | bdcde683bc863d0c574b1e4d64b5a16ba0130596 (diff) | |
download | Qt-e6da35f6055d3ae7acf38d89456d3047f055a9cd.zip Qt-e6da35f6055d3ae7acf38d89456d3047f055a9cd.tar.gz Qt-e6da35f6055d3ae7acf38d89456d3047f055a9cd.tar.bz2 |
QStyleSheetStyle: ItemViews: Fixes drawing of items and branches.
I am not sure why the code was there, but after some testing, it is better
to remove it:
- While painting the branch, we should not look at the ::item pseudo class
at all.
- Items specific stuff is drawn in PE_PanelItemViewItem, not PE_PanelItemViewRow
- Selection is handled his way by the native style. background-color is not for
selection and should not depends on SH_ItemView_ShowDecorationSelected
Reviewed-by: Thierry
Task-number: QTBUG-5228
Task-number: 258382
Task-number: QTBUG-4338
Diffstat (limited to 'tests/auto/uiloader/baseline')
-rw-r--r-- | tests/auto/uiloader/baseline/css_itemview_task258382.ui | 179 |
1 files changed, 179 insertions, 0 deletions
diff --git a/tests/auto/uiloader/baseline/css_itemview_task258382.ui b/tests/auto/uiloader/baseline/css_itemview_task258382.ui new file mode 100644 index 0000000..11c56b4 --- /dev/null +++ b/tests/auto/uiloader/baseline/css_itemview_task258382.ui @@ -0,0 +1,179 @@ +<?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>437</width> + <height>352</height> + </rect> + </property> + <property name="windowTitle"> + <string>Form</string> + </property> + <property name="styleSheet"> + <string notr="true">::item { border: 1px solid black; background-color: purple; } +::item {margin-left: 20px; } + +QAbstractItemView { selection-background-color: red; +show-decoration- selected: 0; + } + +::item:selected { background-color: yellow; }</string> + </property> + <layout class="QGridLayout" name="gridLayout"> + <item row="0" column="0"> + <widget class="QTreeWidget" name="treeWidget"> + <column> + <property name="text"> + <string>1</string> + </property> + </column> + <column> + <property name="text"> + <string>New Column</string> + </property> + </column> + <item> + <property name="text"> + <string>New Item</string> + </property> + </item> + <item> + <property name="text"> + <string>New Item</string> + </property> + </item> + <item> + <property name="text"> + <string>New Item</string> + </property> + <item> + <property name="text"> + <string>New Subitem</string> + </property> + <item> + <property name="text"> + <string>New Subitem</string> + </property> + </item> + <item> + <property name="text"> + <string>New Item</string> + </property> + </item> + <item> + <property name="text"> + <string>New Item</string> + </property> + </item> + </item> + </item> + </widget> + </item> + <item row="1" column="0"> + <widget class="QTableWidget" name="tableWidget"> + <row> + <property name="text"> + <string>New Row</string> + </property> + </row> + <row> + <property name="text"> + <string>New Row</string> + </property> + </row> + <row> + <property name="text"> + <string>New Row</string> + </property> + </row> + <row> + <property name="text"> + <string>New Row</string> + </property> + </row> + <row> + <property name="text"> + <string>New Row</string> + </property> + </row> + <column> + <property name="text"> + <string>New Column</string> + </property> + </column> + <column> + <property name="text"> + <string>New Column</string> + </property> + </column> + <column> + <property name="text"> + <string>New Column</string> + </property> + </column> + <column> + <property name="text"> + <string>New Column</string> + </property> + </column> + <item row="0" column="0"> + <property name="text"> + <string>mljkh mh mjl</string> + </property> + </item> + <item row="0" column="1"> + <property name="text"> + <string>h jlh mjklh </string> + </property> + </item> + <item row="0" column="2"> + <property name="text"> + <string>mjklh mlhj mjlh m</string> + </property> + </item> + <item row="1" column="3"> + <property name="text"> + <string>mlhj lmhj </string> + </property> + </item> + <item row="2" column="0"> + <property name="text"> + <string>mlkj l</string> + </property> + </item> + <item row="2" column="1"> + <property name="text"> + <string>mlkj </string> + </property> + </item> + <item row="2" column="2"> + <property name="text"> + <string>mlkj lmkj </string> + </property> + </item> + <item row="2" column="3"> + <property name="text"> + <string>mlkhj mlh</string> + </property> + </item> + <item row="3" column="1"> + <property name="text"> + <string>mlkj lmkj </string> + </property> + </item> + <item row="4" column="0"> + <property name="text"> + <string>mlkj lmkj </string> + </property> + </item> + </widget> + </item> + </layout> + </widget> + <resources/> + <connections/> +</ui> |