@@ -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(9);
369− } else {
370− cardTool.cardWidth = units.gu(10);
371− }
372− }
373− cardTool.artShapeSize = Qt.size(units.gu(8), units.gu(7.5));
374366 item.artShapeStyle = "icon";
375367 } else {
376368 // Should be ubuntu store icon
@@ -387,6 +379,21 @@ FocusScope {
387379 }
388380 }
389381
382+ function clickScopeSizingHacks() {
383+ if (scope && scope.id === "clickscope" &&
384+ (categoryId === "predefined" || categoryId === "local")) {
385+ // Yeah, hackish :/
386+ if (scopeView.width > units.gu(45)) {
387+ if (scopeView.width >= units.gu(70)) {
388+ cardTool.cardWidth = units.gu(9);
389+ } else {
390+ cardTool.cardWidth = units.gu(10);
391+ }
392+ }
393+ cardTool.artShapeSize = Qt.size(units.gu(8), units.gu(7.5));
394+ }
395+ }
396+
390397 Connections {
391398 target: rendererLoader.item
392399 onClicked: { // (int index, var result, var item, var itemModel)
@@ -416,6 +423,7 @@ FocusScope {
416423 target: scopeView
417424 onIsCurrentChanged: rendererLoader.updateRanges();
418425 onVisibleToParentChanged: rendererLoader.updateRanges();
426+ onWidthChanged: rendererLoader.clickScopeSizingHacks();
419427 }
420428 Connections {
421429 target: holdingList