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