@@ -30,7 +30,10 @@ Item {
30 property real fontScale: 1.0
30 property real fontScale: 1.0
32 property alias headerAlignment: titleLabel.horizontalAlignment
32 property alias headerAlignment: titleLabel.horizontalAlignment
33 property bool inOverlay: false
34 property bool inOverlay: false
35+ property bool useMascotShape: true
36+ property color fontColor: "grey"
35 visible: mascotImage.status === Image.Ready || title || price
38 visible: mascotImage.status === Image.Ready || title || price
36 height: row.height > 0 ? row.height + row.margins * 2 : 0
39 height: row.height > 0 ? row.height + row.margins * 2 : 0
@@ -41,13 +44,13 @@ Item {
42 property real margins: units.gu(1)
45 property real margins: units.gu(1)
47+ spacing: mascotShape.visible || mascotImage.visible || inOverlay ? margins : 0
45 top: parent.top; left: parent.left; right: parent.right
49 top: parent.top; left: parent.left; right: parent.right
46 margins: margins
50 margins: margins
47 leftMargin: spacing
51 leftMargin: spacing
48 rightMargin: spacing
52 rightMargin: spacing
50− spacing: mascotShape.visible || inOverlay ? margins : 0
52 UbuntuShape {
55 UbuntuShape {
53 id: mascotShape
56 id: mascotShape
@@ -56,20 +59,23 @@ Item {
56 // TODO karni: Icon aspect-ratio is 8:7.5. Revisit these values to avoid fraction of pixels.
59 // TODO karni: Icon aspect-ratio is 8:7.5. Revisit these values to avoid fraction of pixels.
57 width: units.gu(6)
60 width: units.gu(6)
58 height: units.gu(5.625)
61 height: units.gu(5.625)
59− visible: image.status === Image.Ready
62+ visible: useMascotShape && image && image.status === Image.Ready
60− // FIXME the * 4 is a workaround to obtain crispness
61− // Find out the proper fix
62 readonly property int maxSize: Math.max(width, height) * 4
63 readonly property int maxSize: Math.max(width, height) * 4
65− id: mascotImage
65+ image: useMascotShape ? mascotImage : null
71+ width: source ? mascotShape.width : 0
72+ height: mascotShape.height
73+ visible: !useMascotShape && status === Image.Ready
68− sourceSize { width: mascotShape.maxSize; height: mascotShape.maxSize }
75+ sourceSize { width: mascotShape.maxSize; height: mascotShape.maxSize }
69− fillMode: Image.PreserveAspectCrop
76+ fillMode: Image.PreserveAspectCrop
70− horizontalAlignment: Image.AlignHCenter
77+ horizontalAlignment: Image.AlignHCenter
71− verticalAlignment: Image.AlignVCenter
78+ verticalAlignment: Image.AlignVCenter
@@ -86,8 +92,7 @@ Item {
86 wrapMode: Text.Wrap
92 wrapMode: Text.Wrap
87 maximumLineCount: 2
93 maximumLineCount: 2
88 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale)
94 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale)
89− // TODO karni (for each Label): Update Ubuntu.Components.Themes.Palette and use theme color instead
95+ color: fontColor
90− color: inOverlay ? "white" : "grey" // Theme.palette.normal.backgroundText
@@ -98,7 +103,7 @@ Item {
98 font.weight: Font.Light
103 font.weight: Font.Light
99 visible: titleLabel.text && text
104 visible: titleLabel.text && text
100 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale)
105 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale)
101− color: inOverlay ? "white" : "grey" // Theme.palette.normal.backgroundText
106+ color: fontColor
@@ -119,7 +124,7 @@ Item {
119 width: parent.labelWidth
124 width: parent.labelWidth
120 elide: Text.ElideRight
125 elide: Text.ElideRight
121 font.weight: Font.DemiBold
126 font.weight: Font.DemiBold
122− color: "grey" // Theme.palette.normal.backgroundText
127+ color: "#ff990000"
123 visible: text
128 visible: text
@@ -129,6 +134,8 @@ Item {
129 width: parent.labelWidth
134 width: parent.labelWidth
130 elide: Text.ElideRight
135 elide: Text.ElideRight
131 horizontalAlignment: parent.labels === 3 ? Text.AlignHCenter : Text.AlignRight
136 horizontalAlignment: parent.labels === 3 ? Text.AlignHCenter : Text.AlignRight
137+ font.strikeout: true
132 visible: text
139 visible: text
@@ -137,6 +144,7 @@ Item {
137 width: parent.labelWidth
144 width: parent.labelWidth
138 elide: Text.ElideRight
145 elide: Text.ElideRight
139 horizontalAlignment: Text.AlignRight
146 horizontalAlignment: Text.AlignRight
140 visible: text
148 visible: text