@@ -360,17 +360,9 @@ FocusScope {
360360 baseItem.expand(shouldExpand, false /*animate*/);
361361 }
362362 updateRanges();
363+ clickScopeSizingHacks();
363364 if (scope && scope.id === "clickscope") {
364365 if (categoryId === "predefined" || categoryId === "local") {
365− // Yeah, hackish :/
366− if (scopeView.width > units.gu(45)) {
367− if (scopeView.width >= units.gu(70)) {
368− cardTool.cardWidth = units.gu(11);
369− item.minimumHorizontalSpacing = units.gu(5)
370− } else {
371− cardTool.cardWidth = units.gu(10);
372− }
373− }
374366 cardTool.artShapeSize = Qt.size(units.gu(8), units.gu(7.5));
375367 item.artShapeStyle = "icon";
376368 } else {
@@ -388,6 +380,23 @@ FocusScope {
388380 }
389381 }
390382
383+ function clickScopeSizingHacks() {
384+ if (scope && scope.id === "clickscope" &&
385+ (categoryId === "predefined" || categoryId === "local")) {
386+ // Yeah, hackish :/
387+ if (scopeView.width > units.gu(45)) {
388+ if (scopeView.width >= units.gu(70)) {
389+ cardTool.cardWidth = units.gu(11);
390+ item.minimumHorizontalSpacing = units.gu(5);
391+ return;
392+ } else {
393+ cardTool.cardWidth = units.gu(10);
394+ }
395+ }
396+ item.minimumHorizontalSpacing = item.defaultMinimumHorizontalSpacing;
397+ }
398+ }
399+
391400 Connections {
392401 target: rendererLoader.item
393402 onClicked: { // (int index, var result, var item, var itemModel)
@@ -417,6 +426,7 @@ FocusScope {
417426 target: scopeView
418427 onIsCurrentChanged: rendererLoader.updateRanges();
419428 onVisibleToParentChanged: rendererLoader.updateRanges();
429+ onWidthChanged: rendererLoader.clickScopeSizingHacks();
420430 }
421431 Connections {
422432 target: holdingList