@@ -30,6 +30,7 @@ Item {
3030 property real fontScale: 1.0
3131
3232 property alias headerAlignment: titleLabel.horizontalAlignment
33+ property bool hasBackground: template && template["card-background"] !== undefined
3334
3435 visible: mascotImage.status === Image.Ready || title || price
3536 height: row.height > 0 ? row.height + row.margins * 2 : 0
@@ -40,13 +41,13 @@ Item {
4041
4142 property real margins: units.gu(1)
4243
44+ spacing: mascotShape.visible || mascotImage.visible || inOverlay ? units.gu(0.5) : 0
4345 anchors {
4446 top: parent.top; left: parent.left; right: parent.right
4547 margins: margins
4648 leftMargin: spacing
4749 rightMargin: spacing
4850 }
49− spacing: mascotShape.visible || (template && template["overlay"]) ? margins : 0
5051
5152 UbuntuShape {
5253 id: mascotShape
@@ -55,17 +56,23 @@ Item {
5556 // TODO karni: Icon aspect-ratio is 8:7.5. Revisit these values to avoid fraction of pixels.
5657 width: units.gu(6)
5758 height: units.gu(5.625)
58− visible: image.status === Image.Ready
59+ visible: !hasBackground && image && image.status === Image.Ready
5960 readonly property int maxSize: Math.max(width, height)
6061
61− image: Image {
62− id: mascotImage
62+ image: hasBackground ? null : mascotImage
63+ }
6364
64− sourceSize { width: mascotShape.maxSize; height: mascotShape.maxSize }
65− fillMode: Image.PreserveAspectCrop
66− horizontalAlignment: Image.AlignHCenter
67− verticalAlignment: Image.AlignVCenter
68− }
65+ Image {
66+ id: mascotImage
67+
68+ width: source ? mascotShape.width : 0
69+ height: mascotShape.height
70+ visible: hasBackground && status === Image.Ready
71+
72+ sourceSize { width: mascotShape.maxSize; height: mascotShape.maxSize }
73+ fillMode: Image.PreserveAspectCrop
74+ horizontalAlignment: Image.AlignHCenter
75+ verticalAlignment: Image.AlignVCenter
6976 }
7077
7178 Column {