@@ -74,7 +74,7 @@ var kArtProportionalShapeCode = 'ProportionalShape { \n\
74 aspect: UbuntuShape.DropShadow; \n\
74 aspect: UbuntuShape.DropShadow; \n\
77−// %1 is used as anchors of artShapeHolder
77+// %1 is used as anchors of artShapeLoader
78// %2 is used as image width
78// %2 is used as image width
79// %3 is used as image height
79// %3 is used as image height
80// %4 is whether the image should be visible
80// %4 is whether the image should be visible
@@ -82,42 +82,37 @@ var kArtProportionalShapeCode = 'ProportionalShape { \n\
82// %6 is the shape code we want to use
82// %6 is the shape code we want to use
83// %7 is injected as code to artImage
83// %7 is injected as code to artImage
84// %8 is used as image fallback
84// %8 is used as image fallback
85−var kArtShapeHolderCode = 'Item { \n\
85+var kArtShapeHolderCode = 'Loader { \n\
86− id: artShapeHolder; \n\
86+ id: artShapeLoader; \n\
87− height: root.fixedArtShapeSize.height; \n\
88− width: root.fixedArtShapeSize.width; \n\
89 anchors { %1 } \n\
87 anchors { %1 } \n\
91− id: artShapeLoader; \n\
92− objectName: "artShapeLoader"; \n\
88+ objectName: "artShapeLoader"; \n\
93− readonly property string cardArt: cardData && cardData["art"] || %8; \n\
89+ readonly property string cardArt: cardData && cardData["art"] || %8; \n\
94− onCardArtChanged: { if (item) { item.image.source = cardArt; } } \n\
90+ onCardArtChanged: { if (item) { item.image.source = cardArt; } } \n\
95− active: cardArt != ""; \n\
91+ active: cardArt != ""; \n\
96− asynchronous: %5; \n\
92+ asynchronous: %5; \n\
97− visible: status == Loader.Ready; \n\
93+ visible: status == Loader.Ready; \n\
98− sourceComponent: Item { \n\
94+ sourceComponent: Item { \n\
99− id: artShape; \n\
95+ id: artShape; \n\
100− objectName: "artShape"; \n\
96+ objectName: "artShape"; \n\
101− visible: image.status == Image.Ready; \n\
97+ visible: image.status == Image.Ready; \n\
102− readonly property alias image: artImage; \n\
98+ readonly property alias image: artImage; \n\
104− width: root.fixedArtShapeSize.width; \n\
100+ width: root.fixedArtShapeSize.width; \n\
105− height: root.fixedArtShapeSize.height; \n\
101+ height: root.fixedArtShapeSize.height; \n\
106− CroppedImageMinimumSourceSize { \n\
102+ CroppedImageMinimumSourceSize { \n\
107− id: artImage; \n\
103+ id: artImage; \n\
108− objectName: "artImage"; \n\
104+ objectName: "artImage"; \n\
109− source: artShapeLoader.cardArt; \n\
105+ source: artShapeLoader.cardArt; \n\
110− asynchronous: %5; \n\
106+ asynchronous: %5; \n\
111− visible: %4; \n\
107+ visible: %4; \n\
112− width: %2; \n\
108+ width: %2; \n\
113− height: %3; \n\
109+ height: %3; \n\
120−// %1 is used as anchors of artShapeHolder
115+// %1 is used as anchors of artShapeLoader
121// %2 is used as image width
116// %2 is used as image width
122// %3 is used as image height
117// %3 is used as image height
123// %4 is whether the image should be visible
118// %4 is whether the image should be visible
@@ -125,37 +120,32 @@ var kArtShapeHolderCode = 'Item { \n\
125// %6 is the shape code we want to use
120// %6 is the shape code we want to use
126// %7 is injected as code to artImage
121// %7 is injected as code to artImage
127// %8 is used as image fallback
122// %8 is used as image fallback
128−var kArtShapeHolderCodeCardToolCard = 'Item { \n\
123+var kArtShapeHolderCodeCardToolCard = 'Loader { \n\
129− id: artShapeHolder; \n\
130− height: artShapeLoader.height; \n\
131− width: artShapeLoader.width; \n\
124+ id: artShapeLoader; \n\
132 anchors { %1 } \n\
125 anchors { %1 } \n\
134− id: artShapeLoader; \n\
135− objectName: "artShapeLoader"; \n\
126+ objectName: "artShapeLoader"; \n\
136− readonly property string cardArt: cardData && cardData["art"] || %8; \n\
127+ readonly property string cardArt: cardData && cardData["art"] || %8; \n\
137− onCardArtChanged: { if (item) { item.image.source = cardArt; } } \n\
128+ onCardArtChanged: { if (item) { item.image.source = cardArt; } } \n\
138− active: cardArt != ""; \n\
129+ active: cardArt != ""; \n\
139− asynchronous: %5; \n\
130+ asynchronous: %5; \n\
140− visible: status == Loader.Ready; \n\
131+ visible: status == Loader.Ready; \n\
141− sourceComponent: Item { \n\
132+ sourceComponent: Item { \n\
142− id: artShape; \n\
133+ id: artShape; \n\
143− objectName: "artShape"; \n\
134+ objectName: "artShape"; \n\
144− visible: image.status == Image.Ready; \n\
135+ visible: image.status == Image.Ready; \n\
145− readonly property alias image: artImage; \n\
136+ readonly property alias image: artImage; \n\
147− width: image.status !== Image.Ready ? 0 : image.width; \n\
138+ width: image.status !== Image.Ready ? 0 : image.width; \n\
148− height: image.status !== Image.Ready ? 0 : image.height; \n\
139+ height: image.status !== Image.Ready ? 0 : image.height; \n\
149− CroppedImageMinimumSourceSize { \n\
140+ CroppedImageMinimumSourceSize { \n\
150− id: artImage; \n\
141+ id: artImage; \n\
151− objectName: "artImage"; \n\
142+ objectName: "artImage"; \n\
152− source: artShapeLoader.cardArt; \n\
143+ source: artShapeLoader.cardArt; \n\
153− asynchronous: %5; \n\
144+ asynchronous: %5; \n\
154− visible: %4; \n\
145+ visible: %4; \n\
155− width: %2; \n\
146+ width: %2; \n\
156− height: %3; \n\
147+ height: %3; \n\
@@ -213,7 +203,7 @@ var kAudioButtonCode = 'AbstractButton { \n\
213var kOverlayLoaderCode = 'Loader { \n\
203var kOverlayLoaderCode = 'Loader { \n\
214 id: overlayLoader; \n\
204 id: overlayLoader; \n\
215 readonly property real overlayHeight: %2 + units.gu(2); \n\
205 readonly property real overlayHeight: %2 + units.gu(2); \n\
216− anchors.fill: artShapeHolder; \n\
206+ anchors.fill: artShapeLoader; \n\
217 active: artShapeLoader.active && artShapeLoader.item && artShapeLoader.item.image.status === Image.Ready || false; \n\
207 active: artShapeLoader.active && artShapeLoader.item && artShapeLoader.item.image.status === Image.Ready || false; \n\
218 asynchronous: %1; \n\
208 asynchronous: %1; \n\
219 visible: showHeader && status == Loader.Ready; \n\
209 visible: showHeader && status == Loader.Ready; \n\
@@ -591,15 +581,15 @@ function cardString(template, components, isCardTool, artShapeStyle) {
592 var headerVerticalAnchors;
582 var headerVerticalAnchors;
593 if (headerAsOverlay) {
583 if (headerAsOverlay) {
594− headerVerticalAnchors = 'bottom: artShapeHolder.bottom; \n\
584+ headerVerticalAnchors = 'bottom: artShapeLoader.bottom; \n\
595 bottomMargin: units.gu(1);\n';
585 bottomMargin: units.gu(1);\n';
597 if (hasArt) {
587 if (hasArt) {
598 if (isHorizontal) {
588 if (isHorizontal) {
599− headerVerticalAnchors = 'top: artShapeHolder.top; \n\
589+ headerVerticalAnchors = 'top: artShapeLoader.top; \n\
600 topMargin: units.gu(1);\n';
590 topMargin: units.gu(1);\n';
602− headerVerticalAnchors = 'top: artShapeHolder.bottom; \n\
592+ headerVerticalAnchors = 'top: artShapeLoader.bottom; \n\
603 topMargin: units.gu(1);\n';
593 topMargin: units.gu(1);\n';
@@ -611,7 +601,7 @@ function cardString(template, components, isCardTool, artShapeStyle) {
611 var headerLeftAnchor;
601 var headerLeftAnchor;
612 var headerLeftAnchorHasMargin = false;
602 var headerLeftAnchorHasMargin = false;
613 if (isHorizontal && hasArt) {
603 if (isHorizontal && hasArt) {
614− headerLeftAnchor = 'left: artShapeHolder.right; \n\
604+ headerLeftAnchor = 'left: artShapeLoader.right; \n\
615 leftMargin: units.gu(1);\n';
605 leftMargin: units.gu(1);\n';
616 headerLeftAnchorHasMargin = true;
606 headerLeftAnchorHasMargin = true;
617 } else if (isHorizontal && isAudio) {
607 } else if (isHorizontal && isAudio) {
@@ -865,7 +855,7 @@ function cardString(template, components, isCardTool, artShapeStyle) {
865 var audioButtonWidth;
855 var audioButtonWidth;
866 var audioButtonHeight;
856 var audioButtonHeight;
867 if (hasArt) {
857 if (hasArt) {
868− audioButtonAnchorsFill = 'artShapeHolder';
858+ audioButtonAnchorsFill = 'artShapeLoader';
869 audioButtonWidth = 'undefined';
859 audioButtonWidth = 'undefined';
870 audioButtonHeight = 'undefined';
860 audioButtonHeight = 'undefined';
@@ -879,15 +869,15 @@ function cardString(template, components, isCardTool, artShapeStyle) {
880 if (hasSummary) {
870 if (hasSummary) {
881 var summaryTopAnchor;
871 var summaryTopAnchor;
882− if (isHorizontal && hasArt) summaryTopAnchor = 'artShapeHolder.bottom';
872+ if (isHorizontal && hasArt) summaryTopAnchor = 'artShapeLoader.bottom';
883− else if (headerAsOverlay && hasArt) summaryTopAnchor = 'artShapeHolder.bottom';
873+ else if (headerAsOverlay && hasArt) summaryTopAnchor = 'artShapeLoader.bottom';
884 else if (hasHeaderRow) summaryTopAnchor = 'row.bottom';
874 else if (hasHeaderRow) summaryTopAnchor = 'row.bottom';
885 else if (hasTitleContainer) summaryTopAnchor = 'headerTitleContainer.bottom';
875 else if (hasTitleContainer) summaryTopAnchor = 'headerTitleContainer.bottom';
886 else if (hasMascot) summaryTopAnchor = 'mascotImage.bottom';
876 else if (hasMascot) summaryTopAnchor = 'mascotImage.bottom';
887 else if (hasAttributes) summaryTopAnchor = 'attributesRow.bottom';
877 else if (hasAttributes) summaryTopAnchor = 'attributesRow.bottom';
888 else if (hasSubtitle) summaryTopAnchor = 'subtitleLabel.bottom';
878 else if (hasSubtitle) summaryTopAnchor = 'subtitleLabel.bottom';
889 else if (hasTitle) summaryTopAnchor = 'titleLabel.bottom';
879 else if (hasTitle) summaryTopAnchor = 'titleLabel.bottom';
890− else if (hasArt) summaryTopAnchor = 'artShapeHolder.bottom';
880+ else if (hasArt) summaryTopAnchor = 'artShapeLoader.bottom';
891 else summaryTopAnchor = 'parent.top';
881 else summaryTopAnchor = 'parent.top';
893 var summaryColor;
883 var summaryColor;
@@ -907,15 +897,15 @@ function cardString(template, components, isCardTool, artShapeStyle) {
907 var socialTopAnchor;
897 var socialTopAnchor;
909 if (hasSummary) socialTopAnchor = 'summary.bottom;';
899 if (hasSummary) socialTopAnchor = 'summary.bottom;';
910− else if (isHorizontal && hasArt) socialTopAnchor = 'artShapeHolder.bottom;';
900+ else if (isHorizontal && hasArt) socialTopAnchor = 'artShapeLoader.bottom;';
911− else if (headerAsOverlay && hasArt) socialTopAnchor = 'artShapeHolder.bottom;';
901+ else if (headerAsOverlay && hasArt) socialTopAnchor = 'artShapeLoader.bottom;';
912 else if (hasHeaderRow) socialTopAnchor = 'row.bottom;';
902 else if (hasHeaderRow) socialTopAnchor = 'row.bottom;';
913 else if (hasTitleContainer) socialTopAnchor = 'headerTitleContainer.bottom;';
903 else if (hasTitleContainer) socialTopAnchor = 'headerTitleContainer.bottom;';
914 else if (hasMascot) socialTopAnchor = 'mascotImage.bottom;';
904 else if (hasMascot) socialTopAnchor = 'mascotImage.bottom;';
915 else if (hasAttributes) socialTopAnchor = 'attributesRow.bottom;';
905 else if (hasAttributes) socialTopAnchor = 'attributesRow.bottom;';
916 else if (hasSubtitle) socialTopAnchor = 'subtitleLabel.bottom;';
906 else if (hasSubtitle) socialTopAnchor = 'subtitleLabel.bottom;';
917 else if (hasTitle) socialTopAnchor = 'titleLabel.bottom;';
907 else if (hasTitle) socialTopAnchor = 'titleLabel.bottom;';
918− else if (hasArt) socialTopAnchor = 'artShapeHolder.bottom;';
908+ else if (hasArt) socialTopAnchor = 'artShapeLoader.bottom;';
919 else socialTopAnchor = 'parent.top';
909 else socialTopAnchor = 'parent.top';
921 socialAnchors = 'top: ' + socialTopAnchor + ' left: parent.left; right: parent.right; topMargin: units.gu(1);'
911 socialAnchors = 'top: ' + socialTopAnchor + ' left: parent.left; right: parent.right; topMargin: units.gu(1);'
@@ -935,7 +925,7 @@ function cardString(template, components, isCardTool, artShapeStyle) {
935 if (hasBackground) {
925 if (hasBackground) {
936 touchdownAnchors = 'fill: backgroundLoader';
926 touchdownAnchors = 'fill: backgroundLoader';
937 } else if (touchdownOnArtShape) {
927 } else if (touchdownOnArtShape) {
938− touchdownAnchors = 'fill: artShapeHolder';
928+ touchdownAnchors = 'fill: artShapeLoader';
940 touchdownAnchors = 'fill: root'
930 touchdownAnchors = 'fill: root'
@@ -950,7 +940,7 @@ function cardString(template, components, isCardTool, artShapeStyle) {
950 } else if (isAudio) {
940 } else if (isAudio) {
951 implicitHeight += 'audioButton.height;\n';
941 implicitHeight += 'audioButton.height;\n';
952 } else if (headerAsOverlay) {
942 } else if (headerAsOverlay) {
953− implicitHeight += 'artShapeHolder.height;\n';
943+ implicitHeight += 'artShapeLoader.height;\n';
954 } else if (hasHeaderRow) {
944 } else if (hasHeaderRow) {
955 implicitHeight += 'row.y + row.height + units.gu(1);\n';
945 implicitHeight += 'row.y + row.height + units.gu(1);\n';
956 } else if (hasMascot) {
946 } else if (hasMascot) {
@@ -964,7 +954,7 @@ function cardString(template, components, isCardTool, artShapeStyle) {
964 } else if (hasTitle) {
954 } else if (hasTitle) {
965 implicitHeight += 'titleLabel.y + titleLabel.height + units.gu(1);\n';
955 implicitHeight += 'titleLabel.y + titleLabel.height + units.gu(1);\n';
966 } else if (hasArt) {
956 } else if (hasArt) {
967− implicitHeight += 'artShapeHolder.height;\n';
957+ implicitHeight += 'artShapeLoader.height;\n';
969 implicitHeight = '';
959 implicitHeight = '';