@@ -43,6 +43,11 @@ Item {
44 property var viewWidth
44 property var viewWidth
47+ \brief The category layout for this card tool
49+ property string categoryLayout: template ? template["category-layout"] : ""
46 // FIXME: Saviq
51 // FIXME: Saviq
47 // Only way for the card below to actually be laid out completely.
52 // Only way for the card below to actually be laid out completely.
48 // If invisible or in "data" array, some components are not taken into account.
53 // If invisible or in "data" array, some components are not taken into account.
@@ -56,7 +61,7 @@ Item {
56 If undefined, should use implicit width of the actual card.
61 If undefined, should use implicit width of the actual card.
58 readonly property var cardWidth: {
63 readonly property var cardWidth: {
59− switch (template !== undefined && template["category-layout"]) {
64+ switch (categoryLayout) {
60 case "grid":
65 case "grid":
61 case "vertical-journal":
66 case "vertical-journal":
62 if (template["card-layout"] === "horizontal") return units.gu(38);
67 if (template["card-layout"] === "horizontal") return units.gu(38);
@@ -84,7 +89,7 @@ Item {
84 If undefined, should use implicit height of the actual card.
89 If undefined, should use implicit height of the actual card.
86 readonly property var cardHeight: {
91 readonly property var cardHeight: {
87− switch (template !== undefined && template["category-layout"]) {
92+ switch (categoryLayout) {
88 case "journal":
93 case "journal":
89 if (template["card-size"] >= 12 && template["card-size"] <= 38) return units.gu(template["card-size"]);
94 if (template["card-size"] >= 12 && template["card-size"] <= 38) return units.gu(template["card-size"]);
90 return units.gu(18.5);
95 return units.gu(18.5);