@@ -43,6 +43,11 @@ Item {
4343 */
4444 property var viewWidth
4545
46+ /*!
47+ \brief The category layout for this card tool
48+ */
49+ property string categoryLayout: template ? template["category-layout"] : ""
50+
4651 // FIXME: Saviq
4752 // Only way for the card below to actually be laid out completely.
4853 // If invisible or in "data" array, some components are not taken into account.
@@ -56,7 +61,7 @@ Item {
5661 If undefined, should use implicit width of the actual card.
5762 */
5863 readonly property var cardWidth: {
59− switch (template !== undefined && template["category-layout"]) {
64+ switch (categoryLayout) {
6065 case "grid":
6166 case "vertical-journal":
6267 if (template["card-layout"] === "horizontal") return units.gu(38);
@@ -84,7 +89,7 @@ Item {
8489 If undefined, should use implicit height of the actual card.
8590 */
8691 readonly property var cardHeight: {
87− switch (template !== undefined && template["category-layout"]) {
92+ switch (categoryLayout) {
8893 case "journal":
8994 if (template["card-size"] >= 12 && template["card-size"] <= 38) return units.gu(template["card-size"]);
9095 return units.gu(18.5);