@@ -128,14 +128,14 @@ FocusScope {
128128 highlightWhenPressed: false
129129 showDivider: false
130130
131− readonly property bool expandable: item ? item.uncollapsedHeight > item.collapsedHeight : false
132− property bool filtered: true
131+ readonly property bool expandable: item ? item.expandedHeight > item.collapsedHeight : false
132+ property bool expanded: false
133133 readonly property string category: categoryId
134134 readonly property var item: rendererLoader.item
135135
136− function setFilter(filter, animate) {
136+ function expand(expand, animate) {
137137 heightBehaviour.enabled = animate;
138− filtered = filter;
138+ expanded = expand;
139139 }
140140
141141 CardTool {
@@ -151,8 +151,8 @@ FocusScope {
151151 // This can happen with the VJ that doesn't know how height it will be on creation
152152 // so doesn't set expandable until a bit too late for onLoaded
153153 if (expandable) {
154− var shouldFilter = baseItem.category != categoryView.expandedCategoryId;
155− baseItem.setFilter(shouldFilter, false /*animate*/);
154+ var shouldExpand = baseItem.category === categoryView.expandedCategoryId;
155+ baseItem.expand(shouldExpand, false /*animate*/);
156156 }
157157 }
158158
@@ -180,7 +180,7 @@ FocusScope {
180180 }
181181 }
182182
183− height: baseItem.filtered ? item.collapsedHeight : item.uncollapsedHeight
183+ height: baseItem.expanded ? item.expandedHeight : item.collapsedHeight
184184
185185 source: {
186186 switch (cardTool.categoryLayout) {
@@ -208,8 +208,8 @@ FocusScope {
208208 item.objectName = Qt.binding(function() { return categoryId })
209209 item.scopeStyle = scopeView.scopeStyle;
210210 if (baseItem.expandable) {
211− var shouldFilter = categoryId != categoryView.expandedCategoryId;
212− baseItem.setFilter(shouldFilter, false /*animate*/);
211+ var shouldExpand = categoryId === categoryView.expandedCategoryId;
212+ baseItem.expand(shouldExpand, false /*animate*/);
213213 }
214214 updateDelegateCreationRange();
215215 item.cardTool = cardTool;
@@ -251,16 +251,16 @@ FocusScope {
251251 function collapseAllButExpandedCategory() {
252252 var item = rendererLoader.item;
253253 if (baseItem.expandable) {
254− var shouldFilter = categoryId != categoryView.expandedCategoryId;
255− if (shouldFilter != baseItem.filtered) {
254+ var shouldExpand = categoryId === categoryView.expandedCategoryId;
255+ if (shouldExpand != baseItem.expanded) {
256256 // If the filter animation will be seen start it, otherwise, just flip the switch
257− var shrinkingVisible = shouldFilter && y + item.collapsedHeight < categoryView.height;
258− var growingVisible = !shouldFilter && y + height < categoryView.height;
259− if (!previewListView.open || !shouldFilter) {
257+ var shrinkingVisible = !shouldExpand && y + item.collapsedHeight < categoryView.height;
258+ var growingVisible = shouldExpand && y + height < categoryView.height;
259+ if (!previewListView.open || shouldExpand) {
260260 var animate = shrinkingVisible || growingVisible;
261− baseItem.setFilter(shouldFilter, animate)
262− if (!shouldFilter && !previewListView.open) {
263− categoryView.maximizeVisibleArea(index, item.uncollapsedHeight);
261+ baseItem.expand(shouldExpand, animate)
262+ if (shouldExpand && !previewListView.open) {
263+ categoryView.maximizeVisibleArea(index, item.expandedHeight);
264264 }
265265 }
266266 }
@@ -338,7 +338,7 @@ FocusScope {
338338 textColor: scopeStyle ? scopeStyle.foreground : "grey"
339339 image: {
340340 if (delegate && delegate.expandable)
341− return delegate.filtered ? "graphics/header_handlearrow.png" : "graphics/header_handlearrow2.png"
341+ return delegate.expanded ? "graphics/header_handlearrow2.png" : "graphics/header_handlearrow.png"
342342 return "";
343343 }
344344 onClicked: {