@@ -102,6 +102,8 @@ Item {
102102
103103 property QtObject priv: card
104104
105+ property var titleHorizontalAlignment: card.titleHorizontalAlignment
106+
105107 Card {
106108 id: card
107109 template: cardTool.template
@@ -110,6 +112,17 @@ Item {
110112 width: cardTool.cardWidth || implicitWidth
111113 height: cardTool.cardHeight || implicitHeight
112114
115+ property var titleHorizontalAlignment: {
116+ // TODO karni: attribute-1 instead of price?
117+ var subtitle = components["subtitle"];
118+ var price = components["price"];
119+ var isOnlyItem = (subtitle === undefined || subtitle === "") && (price === undefined || price === "");
120+ var hasImage = (components["art"]["image"] && components["art"]["image"] !== "") ||
121+ (components["mascot"] && components["mascot"] !== "");
122+ if (!isOnlyItem) return Text.AlignLeft;
123+ return hasImage ? Text.AlignLeft : Text.AlignHCenter;
124+ }
125+
113126 property var fields: ["art", "mascot", "title", "subtitle", "summary"]
114127 property var maxData: {
115128 "art": Qt.resolvedUrl("graphics/checkers.png"),