Ubuntu Pastebin

Paste from cimi at Thu, 17 Nov 2016 10:45:30 +0000

Download as text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
=== modified file 'qml/Dash/GenericScopeView.qml'
--- qml/Dash/GenericScopeView.qml	2016-11-09 15:04:57 +0000
+++ qml/Dash/GenericScopeView.qml	2016-11-17 10:43:49 +0000
@@ -243,8 +243,10 @@
 
             property Item seeAllButton: seeAll
 
+            readonly property bool noExpandable: cardTool.template && cardTool.template["expandable"] === false
             readonly property bool expandable: {
                 if (categoryView.model.count === 1) return false;
+                if (noExpandable) return false;
                 if (cardTool.template && cardTool.template["collapsed-rows"] === 0) return false;
                 if (item && item.expandedHeight > item.collapsedHeight) return true;
                 return false;
@@ -317,7 +319,7 @@
                     }
                 }
 
-                readonly property bool expanded: baseItem.expanded || !baseItem.expandable
+                readonly property bool expanded: !baseItem.noExpandable && (baseItem.expanded || !baseItem.expandable)
                 height: expanded ? item.expandedHeight : item.collapsedHeight
 
                 source: {

=== modified file 'tests/mocks/Unity/fake_categories.cpp'
--- tests/mocks/Unity/fake_categories.cpp	2016-03-07 17:12:34 +0000
+++ tests/mocks/Unity/fake_categories.cpp	2016-11-17 10:45:24 +0000
@@ -64,6 +64,10 @@
         case RoleRenderer:
         {
             QVariantMap map;
+            if (index.row() == 0) {
+                map["expandable"] = false;
+                map["collapsed-rows"] = 1;
+            }
             if (index.row() % 2 == 0) {
                 map["category-layout"] = "grid";
             } else {
Download as text