@@ -23,8 +23,10 @@ AbstractButton {
23 property var components
23 property var components
24 property var cardData
24 property var cardData
26+ property alias fontScale: header.fontScale
26 implicitWidth: childrenRect.width
28 implicitWidth: childrenRect.width
27− implicitHeight: childrenRect.height
29+ implicitHeight: summary.y + summary.height
29 UbuntuShape {
31 UbuntuShape {
30 id: artShape
32 id: artShape
@@ -58,13 +60,67 @@ AbstractButton {
67+ right: artShape.right
68+ bottom: artShape.bottom
73+ visible: template && template["overlay"] && artShape.visible && artShape.image.status === Image.Ready || false
75+ property var source: ShaderEffectSource {
78+ onVisibleChanged: if (visible) scheduleUpdate()
80+ sourceRect: Qt.rect(0, artShape.height - overlay.height, artShape.width, overlay.height)
84+ uniform highp mat4 qt_Matrix;
85+ attribute highp vec4 qt_Vertex;
86+ attribute highp vec2 qt_MultiTexCoord0;
87+ varying highp vec2 coord;
89+ coord = qt_MultiTexCoord0;
90+ gl_Position = qt_Matrix * qt_Vertex;
94+ varying highp vec2 coord;
95+ uniform sampler2D source;
96+ uniform lowp float qt_Opacity;
98+ lowp vec4 tex = texture2D(source, coord);
99+ gl_FragColor = vec4(0, 0, 0, tex.a) * qt_Opacity;
61 CardHeader {
104 CardHeader {
62 id: header
105 id: header
63 objectName: "cardHeader"
106 objectName: "cardHeader"
64 anchors {
107 anchors {
110+ if (template["overlay"]) return overlay.top;
65− top: template && template["card-layout"] === "horizontal" ? artShape.top : artShape.bottom
111+ if (template["card-layout"] === "horizontal") return artShape.top;
113+ return artShape.bottom;
66− left: template && template["card-layout"] === "horizontal" ? artShape.right : parent.left
117+ if (!template["overlay"] && template["card-layout"] === "horizontal") return artShape.right;
67 right: parent.right
121 right: parent.right
122+ margins: template && template["overlay"] ? units.gu(1) : 0
70 mascot: cardData && cardData["mascot"] || ""
126 mascot: cardData && cardData["mascot"] || ""
@@ -73,6 +129,7 @@ AbstractButton {
76 objectName: "summaryLabel"
133 objectName: "summaryLabel"
77 anchors { top: header.visible ? header.bottom : artShape.bottom; left: parent.left; right: parent.right }
134 anchors { top: header.visible ? header.bottom : artShape.bottom; left: parent.left; right: parent.right }
78 wrapMode: Text.Wrap
135 wrapMode: Text.Wrap