26
26
property alias oldPrice: oldPriceLabel.text
27
27
property alias altPrice: altPriceLabel.text
29
property alias titleWeight: titleLabel.font.weight
31
// FIXME: Saviq, used to scale fonts down in Carousel
32
property real fontScale: 1.0
34
property alias headerAlignment: titleLabel.horizontalAlignment
29
36
visible: mascotImage.status === Image.Ready || title || price
30
height: row.height > 0 ? row.height + row.spacing * 2 : 0
37
height: row.height > 0 ? row.height + row.margins * 2 : 0
34
41
objectName: "outerRow"
36
anchors { top: parent.top; left: parent.left; right: parent.right; margins: spacing }
43
property real margins: units.gu(1)
46
top: parent.top; left: parent.left; right: parent.right
51
spacing: mascotShape.visible || (template && template["overlay"]) ? margins : 0
41
55
objectName: "mascotShape"
57
// TODO karni: Icon aspect-ratio is 8:7.5. Revisit these values to avoid fraction of pixels.
59
height: units.gu(5.625)
45
60
visible: image.status === Image.Ready
61
readonly property int maxSize: Math.max(width, height)
49
sourceSize { width: mascotShape.width; height: mascotShape.height }
66
sourceSize { width: mascotShape.maxSize; height: mascotShape.maxSize }
67
fillMode: Image.PreserveAspectCrop
68
horizontalAlignment: Image.AlignHCenter
69
verticalAlignment: Image.AlignVCenter
54
74
objectName: "column"
55
75
width: parent.width - x
76
spacing: units.gu(0.5)
69
93
objectName: "subtitleLabel"
70
94
anchors { left: parent.left; right: parent.right }
71
95
elide: Text.ElideRight
96
font.weight: Font.Light
72
97
visible: titleLabel.text && text
99
font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale)
100
color: template["overlay"] === true ? "white" : Theme.palette.selected.backgroundText