@@ -437,7 +437,7 @@ function sanitizeColor(colorString) {
437437 return colorString;
438438}
439439
440−function cardString(template, components, isCardTool, artShapeStyle) {
440+function cardString(template, components, isCardTool, artShapeStyle, categoryLayout) {
441441 var code;
442442
443443 var templateInteractive = (template == null ? true : (template["non-interactive"] !== undefined ? !template["non-interactive"] : true)) ? "true" : "false";
@@ -943,29 +943,33 @@ function cardString(template, components, isCardTool, artShapeStyle) {
943943 code += kTouchdownCode.arg(touchdownAnchors);
944944 }
945945
946− var implicitHeight = 'implicitHeight: ';
947− if (hasSocialActions) {
948− implicitHeight += 'socialActionsRow.y + socialActionsRow.height + units.gu(1);\n';
949− } else if (hasSummary) {
950− implicitHeight += 'summary.y + summary.height + units.gu(1);\n';
951− } else if (isAudio) {
952− implicitHeight += 'audioButton.height;\n';
953− } else if (headerAsOverlay) {
954− implicitHeight += 'artShapeHolder.height;\n';
955− } else if (hasHeaderRow) {
956− implicitHeight += 'row.y + row.height + units.gu(1);\n';
957− } else if (hasMascot) {
958− implicitHeight += 'mascotImage.y + mascotImage.height;\n';
959− } else if (hasTitleContainer) {
960− implicitHeight += 'headerTitleContainer.y + headerTitleContainer.height + units.gu(1);\n';
961− } else if (hasAttributes) {
962− implicitHeight += 'attributesRow.y + attributesRow.height + units.gu(1);\n';
963− } else if (hasSubtitle) {
964− implicitHeight += 'subtitleLabel.y + subtitleLabel.height + units.gu(1);\n';
965− } else if (hasTitle) {
966− implicitHeight += 'titleLabel.y + titleLabel.height + units.gu(1);\n';
967− } else if (hasArt) {
968− implicitHeight += 'artShapeHolder.height;\n';
946+ if (isCardTool || categoryLayout !== "grid") {
947+ var implicitHeight = 'implicitHeight: ';
948+ if (hasSocialActions) {
949+ implicitHeight += 'socialActionsRow.y + socialActionsRow.height + units.gu(1);\n';
950+ } else if (hasSummary) {
951+ implicitHeight += 'summary.y + summary.height + units.gu(1);\n';
952+ } else if (isAudio) {
953+ implicitHeight += 'audioButton.height;\n';
954+ } else if (headerAsOverlay) {
955+ implicitHeight += 'artShapeHolder.height;\n';
956+ } else if (hasHeaderRow) {
957+ implicitHeight += 'row.y + row.height + units.gu(1);\n';
958+ } else if (hasMascot) {
959+ implicitHeight += 'mascotImage.y + mascotImage.height;\n';
960+ } else if (hasTitleContainer) {
961+ implicitHeight += 'headerTitleContainer.y + headerTitleContainer.height + units.gu(1);\n';
962+ } else if (hasAttributes) {
963+ implicitHeight += 'attributesRow.y + attributesRow.height + units.gu(1);\n';
964+ } else if (hasSubtitle) {
965+ implicitHeight += 'subtitleLabel.y + subtitleLabel.height + units.gu(1);\n';
966+ } else if (hasTitle) {
967+ implicitHeight += 'titleLabel.y + titleLabel.height + units.gu(1);\n';
968+ } else if (hasArt) {
969+ implicitHeight += 'artShapeHolder.height;\n';
970+ } else {
971+ implicitHeight = '';
972+ }
969973 } else {
970974 implicitHeight = '';
971975 }
@@ -976,13 +980,13 @@ function cardString(template, components, isCardTool, artShapeStyle) {
976980 return code;
977981}
978982
979−function createCardComponent(parent, template, components, isCardTool, artShapeStyle, identifier) {
983+function createCardComponent(parent, template, components, isCardTool, artShapeStyle, categoryLayout, identifier) {
980984 var imports = 'import QtQuick 2.4; \n\
981985 import Ubuntu.Components 1.3; \n\
982986 import Ubuntu.Settings.Components 0.1; \n\
983987 import Dash 0.1;\n\
984988 import Utils 0.1;\n';
985− var card = cardString(template, components, isCardTool, artShapeStyle);
989+ var card = cardString(template, components, isCardTool, artShapeStyle, categoryLayout);
986990 var code = imports + 'Component {\n' + card + '}\n';
987991
988992 try {