@@ -19,7 +19,7 @@ import Ubuntu.Components 0.1
22− property alias mascot: mascotImage.source
22+ property var mascot
23 property alias title: titleLabel.text
23 property alias title: titleLabel.text
24 property var subtitle
24 property var subtitle
@@ -35,7 +35,7 @@ Item {
35 property bool useMascotShape: true
35 property bool useMascotShape: true
36 property color fontColor: Theme.palette.selected.backgroundText
36 property color fontColor: Theme.palette.selected.backgroundText
38− visible: mascotImage.status === Image.Ready || title
38+ visible: mascot || title
39 implicitHeight: row.height > 0 ? row.height + row.margins * 2 : 0
39 implicitHeight: row.height > 0 ? row.height + row.margins * 2 : 0
@@ -44,7 +44,7 @@ Item {
45 property real margins: units.gu(1)
45 property real margins: units.gu(1)
47− spacing: mascotShapeLoader.active || mascotImage.visible || inOverlay ? margins : 0
47+ spacing: mascotShapeLoader.active || mascotImageLoader.active || inOverlay ? margins : 0
49 top: parent.top; left: parent.left; right: parent.right
49 top: parent.top; left: parent.left; right: parent.right
50 margins: margins
50 margins: margins
@@ -56,7 +56,7 @@ Item {
56 id: mascotShapeLoader
56 id: mascotShapeLoader
57 objectName: "mascotShapeLoader"
57 objectName: "mascotShapeLoader"
59− active: useMascotShape && mascotImage && mascotImage.status === Image.Ready
59+ active: useMascotShape && mascotImageLoader.item && mascotImageLoader.item.status === Image.Ready
60 visible: active
60 visible: active
61 anchors.verticalCenter: parent.verticalCenter
61 anchors.verticalCenter: parent.verticalCenter
62 // TODO karni: Icon aspect-ratio is 8:7.5. Revisit these values to avoid fraction of pixels.
62 // TODO karni: Icon aspect-ratio is 8:7.5. Revisit these values to avoid fraction of pixels.
@@ -65,23 +65,27 @@ Item {
65 readonly property int maxSize: Math.max(width, height) * 4
65 readonly property int maxSize: Math.max(width, height) * 4
67 sourceComponent: UbuntuShape {
67 sourceComponent: UbuntuShape {
68− image: useMascotShape ? mascotImage : null
68+ image: mascotImageLoader.item
73− id: mascotImage
73+ id: mascotImageLoader
74− objectName: "mascotImage"
74+ active: root.mascot
76− width: source ? mascotShapeLoader.width : 0
77− height: mascotShapeLoader.height
78 anchors.verticalCenter: parent.verticalCenter
75 anchors.verticalCenter: parent.verticalCenter
76+ sourceComponent: Image {
77+ objectName: "mascotImage"
80+ width: source ? mascotShapeLoader.width : 0
81+ height: mascotShapeLoader.height
79− visible: !useMascotShape && status === Image.Ready
82+ visible: !useMascotShape && status === Image.Ready
81− sourceSize { width: mascotShapeLoader.maxSize; height: mascotShapeLoader.maxSize }
84+ sourceSize { width: mascotShapeLoader.maxSize; height: mascotShapeLoader.maxSize }
82− fillMode: Image.PreserveAspectCrop
85+ fillMode: Image.PreserveAspectCrop
83− horizontalAlignment: Image.AlignHCenter
86+ horizontalAlignment: Image.AlignHCenter
84− verticalAlignment: Image.AlignVCenter
87+ verticalAlignment: Image.AlignVCenter