@@ -25,7 +25,7 @@ Item {
25 objectName: "artShapeLoader";
25 objectName: "artShapeLoader";
26 active: cardData && cardData["art"] || false;
26 active: cardData && cardData["art"] || false;
27 asynchronous: root.asynchronous;
27 asynchronous: root.asynchronous;
28− visible: status == Loader.Ready;
28+ visible: status == Loader.Ready;
29 sourceComponent: UbuntuShape {
29 sourceComponent: UbuntuShape {
30 id: artShape;
30 id: artShape;
31 objectName: "artShape";
31 objectName: "artShape";
@@ -40,8 +40,8 @@ Item {
40 width = root.fixedArtShapeSize.width;
40 width = root.fixedArtShapeSize.width;
41 height = root.fixedArtShapeSize.height;
41 height = root.fixedArtShapeSize.height;
43− width = Qt.binding(function() { return !visible ? 0 : image.width });
43+ width = Qt.binding(function() { return !visible ? 0 : image.width });
44− height = Qt.binding(function() { return !visible ? 0 : image.height });
44+ height = Qt.binding(function() { return !visible ? 0 : image.height });
47 image: Image {
47 image: Image {
@@ -49,12 +49,12 @@ Item {
49 source: cardData && cardData["art"] || "";
49 source: cardData && cardData["art"] || "";
50 cache: true;
50 cache: true;
51 asynchronous: root.asynchronous;
51 asynchronous: root.asynchronous;
52− fillMode: Image.PreserveAspectCrop;
52+ fillMode: Image.PreserveAspectCrop;
53 width: root.width;
53 width: root.width;
54 height: width / artShape.aspect;
54 height: width / artShape.aspect;
60 id: overlayLoader;
60 id: overlayLoader;
@@ -63,14 +63,14 @@ Loader {
63 right: artShapeHolder.right;
63 right: artShapeHolder.right;
64 bottom: artShapeHolder.bottom;
64 bottom: artShapeHolder.bottom;
66− active: artShapeLoader.active && artShapeLoader.item && artShapeLoader.item.image.status === Image.Ready || false;
66+ active: artShapeLoader.active && artShapeLoader.item && artShapeLoader.item.image.status === Image.Ready || false;
67 asynchronous: root.asynchronous;
67 asynchronous: root.asynchronous;
68 visible: showHeader && status == Loader.Ready;
68 visible: showHeader && status == Loader.Ready;
69 sourceComponent: ShaderEffect {
69 sourceComponent: ShaderEffect {
70 id: overlay;
70 id: overlay;
71− height: (fixedHeaderHeight > 0 ? fixedHeaderHeight : headerHeight) + units.gu(2);
71+ height: (fixedHeaderHeight > 0 ? fixedHeaderHeight : headerHeight) + units.gu(2);
72− property real luminance: Style.luminance(overlayColor);
72+ property real luminance: Style.luminance(overlayColor);
73− property color overlayColor: cardData && cardData["overlayColor"] || "#99000000";
73+ property color overlayColor: cardData && cardData["overlayColor"] || "#99000000";
74 property var source: ShaderEffectSource {
74 property var source: ShaderEffectSource {
75 id: shaderSource;
75 id: shaderSource;
76 sourceItem: artShapeLoader.item;
76 sourceItem: artShapeLoader.item;
@@ -91,7 +91,7 @@ Loader {
91 varying highp vec2 coord;
91 varying highp vec2 coord;
92 uniform sampler2D source;
92 uniform sampler2D source;
93 uniform lowp float qt_Opacity;
93 uniform lowp float qt_Opacity;
94− uniform highp vec4 overlayColor;
94+ uniform highp vec4 overlayColor;
95 void main() {
95 void main() {
96 lowp vec4 tex = texture2D(source, coord);
96 lowp vec4 tex = texture2D(source, coord);
97 gl_FragColor = vec4(overlayColor.r, overlayColor.g, overlayColor.b, 1) * qt_Opacity * overlayColor.a * tex.a;
97 gl_FragColor = vec4(overlayColor.r, overlayColor.g, overlayColor.b, 1) * qt_Opacity * overlayColor.a * tex.a;
@@ -100,21 +100,21 @@ Loader {
101readonly property int headerHeight: titleLabel.height + subtitleLabel.height + subtitleLabel.anchors.topMargin;
101readonly property int headerHeight: titleLabel.height + subtitleLabel.height + subtitleLabel.anchors.topMargin;
103− id: titleLabel;
103+ id: titleLabel;
104 objectName: "titleLabel";
104 objectName: "titleLabel";
105 anchors { right: parent.right;
105 anchors { right: parent.right;
106− rightMargin: units.gu(1);
106+rightMargin: units.gu(1);
107− left: parent.left;
107+left: parent.left;
108− leftMargin: units.gu(1);
108+ leftMargin: units.gu(1);
109− top: overlayLoader.top;
109+ top: overlayLoader.top;
110− topMargin: units.gu(1);
110+ topMargin: units.gu(1);
112 elide: Text.ElideRight;
112 elide: Text.ElideRight;
113 fontSize: "small";
113 fontSize: "small";
114 wrapMode: Text.Wrap;
114 wrapMode: Text.Wrap;
115 maximumLineCount: 2;
115 maximumLineCount: 2;
116 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
116 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
117− color: root.scopeStyle ? root.scopeStyle.getTextColor(overlayLoader.item.luminance) : (overlayLoader.item.luminance > 0.7 ? Theme.palette.normal.baseText : "white");
117+ color: root.scopeStyle ? root.scopeStyle.getTextColor(overlayLoader.item.luminance) : (overlayLoader.item.luminance > 0.7 ? Theme.palette.normal.baseText : "white");
118 visible: showHeader && overlayLoader.active;
118 visible: showHeader && overlayLoader.active;
119 text: root.title;
119 text: root.title;
120 font.weight: components && components["subtitle"] ? Font.DemiBold : Font.Normal;
120 font.weight: components && components["subtitle"] ? Font.DemiBold : Font.Normal;
@@ -124,28 +124,33 @@ Label {
124 id: subtitleLabel;
124 id: subtitleLabel;
125 objectName: "subtitleLabel";
125 objectName: "subtitleLabel";
126 anchors { left: titleLabel.left;
126 anchors { left: titleLabel.left;
127− leftMargin: titleLabel.leftMargin;
127+ leftMargin: titleLabel.leftMargin;
128− rightMargin: units.gu(1);
128+rightMargin: units.gu(1);
129− right: titleLabel.right;
129+right: titleLabel.right;
130− top: titleLabel.bottom;
130+top: titleLabel.bottom;
132 anchors.topMargin: units.dp(2);
132 anchors.topMargin: units.dp(2);
133 elide: Text.ElideRight;
133 elide: Text.ElideRight;
134 fontSize: "small";
134 fontSize: "small";
135 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
135 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
136− color: root.scopeStyle ? root.scopeStyle.getTextColor(overlayLoader.item.luminance) : (overlayLoader.item.luminance > 0.7 ? Theme.palette.normal.baseText : "white");
136+ color: root.scopeStyle ? root.scopeStyle.getTextColor(overlayLoader.item.luminance) : (overlayLoader.item.luminance > 0.7 ? Theme.palette.normal.baseText : "white");
137 visible: titleLabel.visible && titleLabel.text;
137 visible: titleLabel.visible && titleLabel.text;
138 text: cardData && cardData["subtitle"] || "";
138 text: cardData && cardData["subtitle"] || "";
139 font.weight: Font.Light;
139 font.weight: Font.Light;
140 horizontalAlignment: root.headerAlignment;
140 horizontalAlignment: root.headerAlignment;
142UbuntuShape {
142UbuntuShape {
143− id: touchdown;
143+ id: touchdown;
144− objectName: "touchdown";
144+ objectName: "touchdown";
145− anchors { fill: artShapeHolder }
145+ anchors { fill: artShapeHolder }
147+ if (root.template && root.template["non-interactive"]) {
146− visible: root.pressed;
150+ return root.pressed;
147− radius: "medium";
152+ radius: "medium";
148− borderSource: "radius_pressed.sci"
153+ borderSource: "radius_pressed.sci"
150implicitHeight: subtitleLabel.y + subtitleLabel.height + units.gu(1);
155implicitHeight: subtitleLabel.y + subtitleLabel.height + units.gu(1);