=== 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 {