@@ -123,44 +123,48 @@ AbstractButton {
123123 }
124124 }
125125
126− ShaderEffect {
127− id: overlay
126+ Loader {
127+ id: overlayLoader
128128 anchors {
129129 left: artShape.left
130130 right: artShape.right
131131 bottom: artShape.bottom
132132 }
133+ active: template && template["overlay"] && artShape.visible && artShape.image.status === Image.Ready || false
133134
134− height: header.height
135− opacity: header.opacity * 0.6
136− visible: template && template["overlay"] && artShape.visible && artShape.image.status === Image.Ready || false
135+ sourceComponent: ShaderEffect {
136+ id: overlay
137137
138− property var source: ShaderEffectSource {
139− id: shaderSource
140− sourceItem: artShape
141− onVisibleChanged: if (visible) scheduleUpdate()
142− live: false
143− sourceRect: Qt.rect(0, artShape.height - overlay.height, artShape.width, overlay.height)
144− }
138+ height: header.height
139+ opacity: header.opacity * 0.6
145140
146− vertexShader: "
147− uniform highp mat4 qt_Matrix;
148− attribute highp vec4 qt_Vertex;
149− attribute highp vec2 qt_MultiTexCoord0;
150− varying highp vec2 coord;
151− void main() {
152− coord = qt_MultiTexCoord0;
153− gl_Position = qt_Matrix * qt_Vertex;
154− }"
155−
156− fragmentShader: "
157− varying highp vec2 coord;
158− uniform sampler2D source;
159− uniform lowp float qt_Opacity;
160− void main() {
161− lowp vec4 tex = texture2D(source, coord);
162− gl_FragColor = vec4(0, 0, 0, tex.a) * qt_Opacity;
163− }"
141+ property var source: ShaderEffectSource {
142+ id: shaderSource
143+ sourceItem: artShape
144+ onVisibleChanged: if (visible) scheduleUpdate()
145+ live: false
146+ sourceRect: Qt.rect(0, artShape.height - overlay.height, artShape.width, overlay.height)
147+ }
148+
149+ vertexShader: "
150+ uniform highp mat4 qt_Matrix;
151+ attribute highp vec4 qt_Vertex;
152+ attribute highp vec2 qt_MultiTexCoord0;
153+ varying highp vec2 coord;
154+ void main() {
155+ coord = qt_MultiTexCoord0;
156+ gl_Position = qt_Matrix * qt_Vertex;
157+ }"
158+
159+ fragmentShader: "
160+ varying highp vec2 coord;
161+ uniform sampler2D source;
162+ uniform lowp float qt_Opacity;
163+ void main() {
164+ lowp vec4 tex = texture2D(source, coord);
165+ gl_FragColor = vec4(0, 0, 0, tex.a) * qt_Opacity;
166+ }"
167+ }
164168 }
165169
166170 CardHeader {
@@ -169,7 +173,7 @@ AbstractButton {
169173 anchors {
170174 top: {
171175 if (template) {
172− if (template["overlay"]) return overlay.top;
176+ if (template["overlay"]) return overlayLoader.top;
173177 if (template["card-layout"] === "horizontal") return artShape.top;
174178 }
175179 return artShape.bottom;