@@ -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,19 +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
67− sourceSize { width: mascotShape.maxSize; height: mascotShape.maxSize }
75+ sourceSize { width: mascotShape.maxSize; height: mascotShape.maxSize }
68− fillMode: Image.PreserveAspectCrop
76+ fillMode: Image.PreserveAspectCrop
69− horizontalAlignment: Image.AlignHCenter
77+ horizontalAlignment: Image.AlignHCenter
70− verticalAlignment: Image.AlignVCenter
78+ verticalAlignment: Image.AlignVCenter
@@ -85,8 +92,7 @@ Item {
85 wrapMode: Text.Wrap
92 wrapMode: Text.Wrap
86 maximumLineCount: 2
93 maximumLineCount: 2
87 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale)
94 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale)
88− // TODO karni (for each Label): Update Ubuntu.Components.Themes.Palette and use theme color instead
95+ color: fontColor
89− color: inOverlay ? "white" : "grey" // Theme.palette.normal.backgroundText
@@ -97,7 +103,7 @@ Item {
97 font.weight: Font.Light
103 font.weight: Font.Light
98 visible: titleLabel.text && text
104 visible: titleLabel.text && text
99 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale)
105 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale)
100− color: inOverlay ? "white" : "grey" // Theme.palette.normal.backgroundText
106+ color: fontColor
@@ -118,7 +124,7 @@ Item {
118 width: parent.labelWidth
124 width: parent.labelWidth
119 elide: Text.ElideRight
125 elide: Text.ElideRight
120 font.weight: Font.DemiBold
126 font.weight: Font.DemiBold
121− color: "grey" // Theme.palette.normal.backgroundText
127+ color: "#ff990000"
122 visible: text
128 visible: text
@@ -128,6 +134,8 @@ Item {
128 width: parent.labelWidth
134 width: parent.labelWidth
129 elide: Text.ElideRight
135 elide: Text.ElideRight
130 horizontalAlignment: parent.labels === 3 ? Text.AlignHCenter : Text.AlignRight
136 horizontalAlignment: parent.labels === 3 ? Text.AlignHCenter : Text.AlignRight
137+ font.strikeout: true
131 visible: text
139 visible: text
@@ -136,6 +144,7 @@ Item {
136 width: parent.labelWidth
144 width: parent.labelWidth
137 elide: Text.ElideRight
145 elide: Text.ElideRight
138 horizontalAlignment: Text.AlignRight
146 horizontalAlignment: Text.AlignRight
139 visible: text
148 visible: text