on xenial help sign in
Seems we don't really need the ShaderEffectSource
7189f31Albert Astals Cid
plugins/Dash/CardCreator.js+4−11
@@ -62,7 +62,7 @@ var kBackgroundLoaderCode = 'Loader {\n\
62// %1 is used as anchors of artShapeHolder
62// %1 is used as anchors of artShapeHolder
63// %2 is used as image width
63// %2 is used as image width
64// %3 is used as image height
64// %3 is used as image height
65−// %4 is used for artShapeSource.hideSource and inner Loader visible
65+// %4 is whether the image or the Loader with the UbuntuShape/ProportionalShape should be visible
66// %5 is used as aspect ratio fallback
66// %5 is used as aspect ratio fallback
67// %6 is whether the loader should be asynchronous or not
67// %6 is whether the loader should be asynchronous or not
68// %7 is injected as code to artImage
68// %7 is injected as code to artImage
@@ -84,14 +84,6 @@ var kArtShapeHolderCode = 'Item { \n\
84 objectName: "artShape"; \n\
84 objectName: "artShape"; \n\
85 visible: image.status == Image.Ready; \n\
85 visible: image.status == Image.Ready; \n\
86 readonly property alias image: artImage; \n\
86 readonly property alias image: artImage; \n\
87− ShaderEffectSource { \n\
88− id: artShapeSource; \n\
89− sourceItem: artImage; \n\
90− anchors.centerIn: parent; \n\
91− width: 1; \n\
92− height: 1; \n\
93− hideSource: %4; \n\
94− } \n\
95 Loader { \n\
87 Loader { \n\
96 anchors.fill: parent; \n\
88 anchors.fill: parent; \n\
97 visible: %4; \n\
89 visible: %4; \n\
@@ -99,7 +91,7 @@ var kArtShapeHolderCode = 'Item { \n\
99 Component { \n\
91 Component { \n\
100 id: artShapeShapeComponent; \n\
92 id: artShapeShapeComponent; \n\
101 UbuntuShape { \n\
93 UbuntuShape { \n\
102− source: artShapeSource; \n\
94+ source: artImage; \n\
103 sourceFillMode: UbuntuShape.PreserveAspectCrop; \n\
95 sourceFillMode: UbuntuShape.PreserveAspectCrop; \n\
104 radius: "medium"; \n\
96 radius: "medium"; \n\
105 aspect: { \n\
97 aspect: { \n\
@@ -114,7 +106,7 @@ var kArtShapeHolderCode = 'Item { \n\
114 } \n\
106 } \n\
115 Component { \n\
107 Component { \n\
116 id: artShapeIconComponent; \n\
108 id: artShapeIconComponent; \n\
117− ProportionalShape { source: artShapeSource; aspect: UbuntuShape.DropShadow; } \n\
109+ ProportionalShape { source: artImage; aspect: UbuntuShape.DropShadow; } \n\
118 } \n\
110 } \n\
119 } \n\
111 } \n\
120 readonly property real fixedArtShapeSizeAspect: (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) ? root.fixedArtShapeSize.width / root.fixedArtShapeSize.height : -1; \n\
112 readonly property real fixedArtShapeSizeAspect: (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) ? root.fixedArtShapeSize.width / root.fixedArtShapeSize.height : -1; \n\
@@ -135,6 +127,7 @@ var kArtShapeHolderCode = 'Item { \n\
135 objectName: "artImage"; \n\
127 objectName: "artImage"; \n\
136 source: artShapeLoader.cardArt; \n\
128 source: artShapeLoader.cardArt; \n\
137 asynchronous: %6; \n\
129 asynchronous: %6; \n\
130+ visible: !%4; \n\
138 width: %2; \n\
131 width: %2; \n\
139 height: %3; \n\
132 height: %3; \n\
140 %7 \n\
133 %7 \n\