on xenial help sign in
Fix results
68a114eYing-Chun Liu
tests/plugins/Dash/cardcreator/1.res+25−25
@@ -33,21 +33,21 @@ Item {
33 visible: image.status == Image.Ready;
33 visible: image.status == Image.Ready;
34 readonly property real fixedArtShapeSizeAspect: (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) ? root.fixedArtShapeSize.width / root.fixedArtShapeSize.height : -1;
34 readonly property real fixedArtShapeSizeAspect: (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) ? root.fixedArtShapeSize.width / root.fixedArtShapeSize.height : -1;
35 readonly property real aspect: fixedArtShapeSizeAspect > 0 ? fixedArtShapeSizeAspect : components !== undefined ? components["art"]["aspect-ratio"] : 1;
35 readonly property real aspect: fixedArtShapeSizeAspect > 0 ? fixedArtShapeSizeAspect : components !== undefined ? components["art"]["aspect-ratio"] : 1;
36− Component.onCompleted: { updateWidthHeightBindings(); if (artShapeBorderSource !== undefined) borderSource = artShapeBorderSource; }
36+ Component.onCompleted: { updateWidthHeightBindings(); if (artShapeBorderSource !== undefined) borderSource = artShapeBorderSource; }
37 Connections { target: root; onFixedArtShapeSizeChanged: updateWidthHeightBindings(); }
37 Connections { target: root; onFixedArtShapeSizeChanged: updateWidthHeightBindings(); }
38 function updateWidthHeightBindings() {
38 function updateWidthHeightBindings() {
39 if (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) {
39 if (root.fixedArtShapeSize.height > 0 && root.fixedArtShapeSize.width > 0) {
40 width = root.fixedArtShapeSize.width;
40 width = root.fixedArtShapeSize.width;
41 height = root.fixedArtShapeSize.height;
41 height = root.fixedArtShapeSize.height;
42 } else {
42 } else {
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 });
45 }
45 }
46 }
46 }
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;
@@ -61,34 +61,34 @@ readonly property int headerHeight: titleLabel.height;
61Label {
61Label {
62 id: titleLabel;
62 id: titleLabel;
63 objectName: "titleLabel";
63 objectName: "titleLabel";
64− anchors { right: parent.right;
64+ anchors { right: parent.right;
65−left: parent.left;
65+ left: parent.left;
66−top: artShapeHolder.bottom;
66+ top: artShapeHolder.bottom;
67− topMargin: units.gu(1);
67+ topMargin: units.gu(1);
68− }
68+ }
69 elide: Text.ElideRight;
69 elide: Text.ElideRight;
70 fontSize: "small";
70 fontSize: "small";
71 wrapMode: Text.Wrap;
71 wrapMode: Text.Wrap;
72 maximumLineCount: 2;
72 maximumLineCount: 2;
73 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
73 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
74− color: root.scopeStyle ? root.scopeStyle.foreground : Theme.palette.normal.baseText;
74+ color: root.scopeStyle ? root.scopeStyle.foreground : Theme.palette.normal.baseText;
75 visible: showHeader ;
75 visible: showHeader ;
76 text: root.title;
76 text: root.title;
77 font.weight: cardData && cardData["subtitle"] ? Font.DemiBold : Font.Normal;
77 font.weight: cardData && cardData["subtitle"] ? Font.DemiBold : Font.Normal;
78 horizontalAlignment: root.titleAlignment;
78 horizontalAlignment: root.titleAlignment;
79 }
79 }
80−UbuntuShape {
80+UbuntuShape {
81− id: touchdown;
81+ id: touchdown;
82− objectName: "touchdown";
82+ objectName: "touchdown";
83− anchors { fill: artShapeHolder }
83+ anchors { fill: artShapeHolder }
84− visible: {
84+ visible: {
85− if (root.template && root.template["non-interactive"]) {
85+ if (root.template && root.template["non-interactive"]) {
86− return false;
86+ return false;
87− }
87+ }
88− return root.pressed;
88+ return root.pressed;
89− }
89+ }
90− radius: "medium";
90+ radius: "medium";
91− borderSource: "radius_pressed.sci"
91+ borderSource: "radius_pressed.sci"
92− }
92+}
93implicitHeight: titleLabel.y + titleLabel.height + units.gu(1);
93implicitHeight: titleLabel.y + titleLabel.height + units.gu(1);
94}
94}
tests/plugins/Dash/cardcreator/2.res+36−36
@@ -55,24 +55,24 @@ Row {
55 spacing: margins;
55 spacing: margins;
56 height: root.fixedHeaderHeight != -1 ? root.fixedHeaderHeight : implicitHeight;
56 height: root.fixedHeaderHeight != -1 ? root.fixedHeaderHeight : implicitHeight;
57 anchors { top: parent.top;
57 anchors { top: parent.top;
58− topMargin: units.gu(1);
58+ topMargin: units.gu(1);
59−left: parent.left;
59+ left: parent.left;
60− }
60+ }
61 anchors.right: parent.right;
61 anchors.right: parent.right;
62− anchors.margins: margins;
62+ anchors.margins: margins;
63− anchors.rightMargin: 0;
63+ anchors.rightMargin: 0;
64− data: [
64+ data: [
65− CroppedImageMinimumSourceSize {
65+CroppedImageMinimumSourceSize {
66 id: mascotImage;
66 id: mascotImage;
67 objectName: "mascotImage";
67 objectName: "mascotImage";
68 anchors { verticalCenter: parent.verticalCenter; }
68 anchors { verticalCenter: parent.verticalCenter; }
69− property bool doLoadSource: !NetworkingStatus.limitedBandwith;
69+ property bool doLoadSource: !NetworkingStatus.limitedBandwith;
70− source: { if (root.visible) doLoadSource = true; return doLoadSource && cardData && cardData["mascot"] || ""; }
70+ source: { if (root.visible) doLoadSource = true; return doLoadSource && cardData && cardData["mascot"] || ""; }
71 width: units.gu(6);
71 width: units.gu(6);
72 height: units.gu(5.625);
72 height: units.gu(5.625);
73 horizontalAlignment: Image.AlignHCenter;
73 horizontalAlignment: Image.AlignHCenter;
74 verticalAlignment: Image.AlignVCenter;
74 verticalAlignment: Image.AlignVCenter;
75− visible: showHeader && resized;
75+ visible: showHeader && resized;
76 }
76 }
77,Item {
77,Item {
78 id: headerTitleContainer;
78 id: headerTitleContainer;
@@ -83,56 +83,56 @@ left: parent.left;
83 Label {
83 Label {
84 id: titleLabel;
84 id: titleLabel;
85 objectName: "titleLabel";
85 objectName: "titleLabel";
86− anchors { right: parent.right;
86+ anchors { right: parent.right;
87−rightMargin: units.gu(1);
87+ rightMargin: units.gu(1);
88−left: parent.left;
88+ left: parent.left;
89− top: parent.top; }
89+ top: parent.top; }
90 elide: Text.ElideRight;
90 elide: Text.ElideRight;
91 fontSize: "small";
91 fontSize: "small";
92 wrapMode: Text.Wrap;
92 wrapMode: Text.Wrap;
93 maximumLineCount: 2;
93 maximumLineCount: 2;
94 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
94 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
95− color: backgroundLoader.active && backgroundLoader.item && root.scopeStyle ? root.scopeStyle.getTextColor(backgroundLoader.item.luminance) : (backgroundLoader.item && backgroundLoader.item.luminance > 0.7 ? Theme.palette.normal.baseText : "white");
95+ color: backgroundLoader.active && backgroundLoader.item && root.scopeStyle ? root.scopeStyle.getTextColor(backgroundLoader.item.luminance) : (backgroundLoader.item && backgroundLoader.item.luminance > 0.7 ? Theme.palette.normal.baseText : "white");
96 visible: showHeader ;
96 visible: showHeader ;
97 text: root.title;
97 text: root.title;
98 font.weight: cardData && cardData["subtitle"] ? Font.DemiBold : Font.Normal;
98 font.weight: cardData && cardData["subtitle"] ? Font.DemiBold : Font.Normal;
99 horizontalAlignment: root.titleAlignment;
99 horizontalAlignment: root.titleAlignment;
100 }
100 }
101−,Label {
101+ ,Label {
102 id: subtitleLabel;
102 id: subtitleLabel;
103 objectName: "subtitleLabel";
103 objectName: "subtitleLabel";
104− anchors { right: parent.right;
104+ anchors { right: parent.right;
105− left: parent.left;
105+ left: parent.left;
106−rightMargin: units.gu(1);
106+ rightMargin: units.gu(1);
107−top: titleLabel.bottom;
107+ top: titleLabel.bottom;
108− }
108+ }
109 anchors.topMargin: units.dp(2);
109 anchors.topMargin: units.dp(2);
110 elide: Text.ElideRight;
110 elide: Text.ElideRight;
111 fontSize: "x-small";
111 fontSize: "x-small";
112 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
112 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
113− color: backgroundLoader.active && backgroundLoader.item && root.scopeStyle ? root.scopeStyle.getTextColor(backgroundLoader.item.luminance) : (backgroundLoader.item && backgroundLoader.item.luminance > 0.7 ? Theme.palette.normal.baseText : "white");
113+ color: backgroundLoader.active && backgroundLoader.item && root.scopeStyle ? root.scopeStyle.getTextColor(backgroundLoader.item.luminance) : (backgroundLoader.item && backgroundLoader.item.luminance > 0.7 ? Theme.palette.normal.baseText : "white");
114 visible: titleLabel.visible && titleLabel.text;
114 visible: titleLabel.visible && titleLabel.text;
115 text: cardData && cardData["subtitle"] || "";
115 text: cardData && cardData["subtitle"] || "";
116 font.weight: Font.Light;
116 font.weight: Font.Light;
117 }
117 }
118
118
119− ]
119+ ]
120 }
120 }
121
121
122 ]
122 ]
123 }
123 }
124−UbuntuShape {
124+UbuntuShape {
125− id: touchdown;
125+ id: touchdown;
126− objectName: "touchdown";
126+ objectName: "touchdown";
127− anchors { fill: backgroundLoader }
127+ anchors { fill: backgroundLoader }
128− visible: {
128+ visible: {
129− if (root.template && root.template["non-interactive"]) {
129+ if (root.template && root.template["non-interactive"]) {
130− return false;
130+ return false;
131− }
131+ }
132− return root.pressed;
132+ return root.pressed;
133− }
133+ }
134− radius: "medium";
134+ radius: "medium";
135− borderSource: "radius_pressed.sci"
135+ borderSource: "radius_pressed.sci"
136− }
136+}
137implicitHeight: row.y + row.height + units.gu(1);
137implicitHeight: row.y + row.height + units.gu(1);
138}
138}
tests/plugins/Dash/cardcreator/3.res+33−33
@@ -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,15 +40,15 @@ Item {
40 width = root.fixedArtShapeSize.width;
40 width = root.fixedArtShapeSize.width;
41 height = root.fixedArtShapeSize.height;
41 height = root.fixedArtShapeSize.height;
42 } else {
42 } else {
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 });
45− }
45+ }
46 }
46 }
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;
@@ -61,17 +61,17 @@ readonly property int headerHeight: titleLabel.height + subtitleLabel.height + s
61Label {
61Label {
62 id: titleLabel;
62 id: titleLabel;
63 objectName: "titleLabel";
63 objectName: "titleLabel";
64− anchors { right: parent.right;
64+ anchors { right: parent.right;
65−left: parent.left;
65+ left: parent.left;
66−top: artShapeHolder.bottom;
66+ top: artShapeHolder.bottom;
67− topMargin: units.gu(1);
67+ topMargin: units.gu(1);
68− }
68+ }
69 elide: Text.ElideRight;
69 elide: Text.ElideRight;
70 fontSize: "small";
70 fontSize: "small";
71 wrapMode: Text.Wrap;
71 wrapMode: Text.Wrap;
72 maximumLineCount: 2;
72 maximumLineCount: 2;
73 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
73 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
74− color: root.scopeStyle ? root.scopeStyle.foreground : Theme.palette.normal.baseText;
74+ color: root.scopeStyle ? root.scopeStyle.foreground : Theme.palette.normal.baseText;
75 visible: showHeader ;
75 visible: showHeader ;
76 text: root.title;
76 text: root.title;
77 font.weight: cardData && cardData["subtitle"] ? Font.DemiBold : Font.Normal;
77 font.weight: cardData && cardData["subtitle"] ? Font.DemiBold : Font.Normal;
@@ -81,31 +81,31 @@ Label {
81 id: subtitleLabel;
81 id: subtitleLabel;
82 objectName: "subtitleLabel";
82 objectName: "subtitleLabel";
83 anchors { left: titleLabel.left;
83 anchors { left: titleLabel.left;
84− leftMargin: titleLabel.leftMargin;
84+ leftMargin: titleLabel.leftMargin;
85−right: titleLabel.right;
85+ right: titleLabel.right;
86−top: titleLabel.bottom;
86+ top: titleLabel.bottom;
87− }
87+ }
88− anchors.topMargin: units.dp(2);
88+ anchors.topMargin: units.dp(2);
89 elide: Text.ElideRight;
89 elide: Text.ElideRight;
90 fontSize: "x-small";
90 fontSize: "x-small";
91 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
91 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
92− color: root.scopeStyle ? root.scopeStyle.foreground : Theme.palette.normal.baseText;
92+ color: root.scopeStyle ? root.scopeStyle.foreground : Theme.palette.normal.baseText;
93 visible: titleLabel.visible && titleLabel.text;
93 visible: titleLabel.visible && titleLabel.text;
94 text: cardData && cardData["subtitle"] || "";
94 text: cardData && cardData["subtitle"] || "";
95 font.weight: Font.Light;
95 font.weight: Font.Light;
96 }
96 }
97−UbuntuShape {
97+UbuntuShape {
98− id: touchdown;
98+ id: touchdown;
99− objectName: "touchdown";
99+ objectName: "touchdown";
100− anchors { fill: artShapeHolder }
100+ anchors { fill: artShapeHolder }
101− visible: {
101+ visible: {
102− if (root.template && root.template["non-interactive"]) {
102+ if (root.template && root.template["non-interactive"]) {
103− return false;
103+ return false;
104− }
104+ }
105− return root.pressed;
105+ return root.pressed;
106− }
106+ }
107− radius: "medium";
107+ radius: "medium";
108− borderSource: "radius_pressed.sci"
108+ borderSource: "radius_pressed.sci"
109− }
109+}
110implicitHeight: subtitleLabel.y + subtitleLabel.height + units.gu(1);
110implicitHeight: subtitleLabel.y + subtitleLabel.height + units.gu(1);
111}
111}
tests/plugins/Dash/cardcreator/4.res+87−87
@@ -5,8 +5,8 @@ AbstractButton {
5 property var cardData;
5 property var cardData;
6 property var artShapeBorderSource: undefined;
6 property var artShapeBorderSource: undefined;
7 property real fontScale: 1.0;
7 property real fontScale: 1.0;
8− property var scopeStyle: null;
8+ property var scopeStyle: null;
9− property int titleAlignment: Text.AlignLeft;
9+ property int titleAlignment: Text.AlignLeft;
10 property int fixedHeaderHeight: -1;
10 property int fixedHeaderHeight: -1;
11 property size fixedArtShapeSize: Qt.size(-1, -1);
11 property size fixedArtShapeSize: Qt.size(-1, -1);
12 readonly property string title: cardData && cardData["title"] || "";
12 readonly property string title: cardData && cardData["title"] || "";
@@ -16,101 +16,101 @@ AbstractButton {
16readonly property size artShapeSize: Qt.size(-1, -1);
16readonly property size artShapeSize: Qt.size(-1, -1);
17readonly property int headerHeight: row.height;
17readonly property int headerHeight: row.height;
18Row {
18Row {
19− id: row;
19+ id: row;
20− objectName: "outerRow";
20+ objectName: "outerRow";
21− property real margins: units.gu(1);
21+ property real margins: units.gu(1);
22− spacing: margins;
22+ spacing: margins;
23− height: root.fixedHeaderHeight != -1 ? root.fixedHeaderHeight : implicitHeight;
23+ height: root.fixedHeaderHeight != -1 ? root.fixedHeaderHeight : implicitHeight;
24− anchors { top: parent.top;
24+ anchors { top: parent.top;
25 topMargin: units.gu(1);
25 topMargin: units.gu(1);
26−left: parent.left;
26+ left: parent.left;
27− }
27+}
28− anchors.right: parent.right;
28+ anchors.right: parent.right;
29− anchors.margins: margins;
29+ anchors.margins: margins;
30− anchors.rightMargin: 0;
30+ anchors.rightMargin: 0;
31− data: [
31+data: [
32− Loader {
32+Loader {
33− id: mascotShapeLoader;
33+ id: mascotShapeLoader;
34− objectName: "mascotShapeLoader";
34+ objectName: "mascotShapeLoader";
35− asynchronous: root.asynchronous;
35+ asynchronous: root.asynchronous;
36− active: mascotImage.status === Image.Ready;
36+ active: mascotImage.status === Image.Ready;
37− visible: showHeader && active && status == Loader.Ready;
37+ visible: showHeader && active && status == Loader.Ready;
38− width: units.gu(6);
38+ width: units.gu(6);
39− height: units.gu(5.625);
39+ height: units.gu(5.625);
40− sourceComponent: UbuntuShape { image: mascotImage }
40+ sourceComponent: UbuntuShape { image: mascotImage }
41− anchors { verticalCenter: parent.verticalCenter; }
41+ anchors { verticalCenter: parent.verticalCenter; }
42− }
42+ }
43+
43−,CroppedImageMinimumSourceSize {
44+,CroppedImageMinimumSourceSize {
44− id: mascotImage;
45+ id: mascotImage;
45− objectName: "mascotImage";
46+ objectName: "mascotImage";
46− anchors { verticalCenter: parent.verticalCenter; }
47+ anchors { verticalCenter: parent.verticalCenter; }
47− property bool doLoadSource: !NetworkingStatus.limitedBandwith;
48+ property bool doLoadSource: !NetworkingStatus.limitedBandwith;
48− source: { if (root.visible) doLoadSource = true; return doLoadSource && cardData && cardData["mascot"] || ""; }
49+ source: { if (root.visible) doLoadSource = true; return doLoadSource && cardData && cardData["mascot"] || ""; }
49− width: units.gu(6);
50+ width: units.gu(6);
50− height: units.gu(5.625);
51+ height: units.gu(5.625);
51− horizontalAlignment: Image.AlignHCenter;
52+ horizontalAlignment: Image.AlignHCenter;
52− verticalAlignment: Image.AlignVCenter;
53+ verticalAlignment: Image.AlignVCenter;
53− visible: false;
54+ visible: false;
54− }
55+ }
56+
55,Item {
57,Item {
56 id: headerTitleContainer;
58 id: headerTitleContainer;
57 anchors { verticalCenter: parent.verticalCenter; }
59 anchors { verticalCenter: parent.verticalCenter; }
58 width: parent.width - x;
60 width: parent.width - x;
59 implicitHeight: titleLabel.height + subtitleLabel.height;
61 implicitHeight: titleLabel.height + subtitleLabel.height;
60 data: [
62 data: [
61− Label {
63+Label {
62− id: titleLabel;
64+ id: titleLabel;
65+ objectName: "titleLabel";
66+ anchors { right: parent.right;
67+ rightMargin: units.gu(1);
68+ left: parent.left;
69+ top: parent.top; }
70+ elide: Text.ElideRight;
71+ fontSize: "small";
72+ wrapMode: Text.Wrap;
73+ maximumLineCount: 2;
74+ font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
75+ color: root.scopeStyle ? root.scopeStyle.foreground : Theme.palette.normal.baseText;
76+ visible: showHeader ;
77+ text: root.title;
78+ font.weight: cardData && cardData["subtitle"] ? Font.DemiBold : Font.Normal;
79+ horizontalAlignment: root.titleAlignment;
80+ }
81+,Label {
82+ id: subtitleLabel;
63− objectName: "titleLabel";
83+ objectName: "subtitleLabel";
64 anchors { right: parent.right;
84 anchors { right: parent.right;
85+ left: parent.left;
65−rightMargin: units.gu(1);
86+ rightMargin: units.gu(1);
66−left: parent.left;
87+ top: titleLabel.bottom;
67− top: parent.top; }
88+ }
89+ anchors.topMargin: units.dp(2);
68 elide: Text.ElideRight;
90 elide: Text.ElideRight;
69− fontSize: "small";
91+ fontSize: "x-small";
70− wrapMode: Text.Wrap;
71− maximumLineCount: 2;
72 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
92 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
73− color: root.scopeStyle ? root.scopeStyle.foreground : Theme.palette.normal.baseText;
93+ color: root.scopeStyle ? root.scopeStyle.foreground : Theme.palette.normal.baseText;
74− visible: showHeader ;
75− text: root.title;
76− font.weight: cardData && cardData["subtitle"] ? Font.DemiBold : Font.Normal;
77− horizontalAlignment: root.titleAlignment;
78− }
79−,Label {
80− id: subtitleLabel;
81− objectName: "subtitleLabel";
82− anchors { right: parent.right;
83− left: parent.left;
84−rightMargin: units.gu(1);
85−top: titleLabel.bottom;
86− }
87− anchors.topMargin: units.dp(2);
88− elide: Text.ElideRight;
89− fontSize: "x-small";
90− font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
91− color: root.scopeStyle ? root.scopeStyle.foreground : Theme.palette.normal.baseText;
92− visible: titleLabel.visible && titleLabel.text;
94+ visible: titleLabel.visible && titleLabel.text;
93− text: cardData && cardData["subtitle"] || "";
95+ text: cardData && cardData["subtitle"] || "";
94− font.weight: Font.Light;
96+ font.weight: Font.Light;
95− }
96−
97− ]
98− }
99−
100− ]
101− }
102−UbuntuShape {
103− id: touchdown;
104− objectName: "touchdown";
105− anchors { fill: root }
106− visible: {
107− if (root.template && root.template["non-interactive"]) {
108− return false;
109− }
110− return root.pressed;
111− }
112− radius: "medium";
113− borderSource: "radius_pressed.sci"
114 }
97 }
98+]
99+}
100+]
101+}
102+UbuntuShape {
103+ id: touchdown;
104+ objectName: "touchdown";
105+ anchors { fill: root }
106+ visible: {
107+ if (root.template && root.template["non-interactive"]) {
108+ return false;
109+ }
110+ return root.pressed;
111+ }
112+ radius: "medium";
113+ borderSource: "radius_pressed.sci"
114+}
115implicitHeight: row.y + row.height + units.gu(1);
115implicitHeight: row.y + row.height + units.gu(1);
116}
116}
tests/plugins/Dash/cardcreator/5.res+40−40
@@ -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;
42 } else {
42 } else {
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 });
45− }
45+ }
46 }
46 }
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;
56 }
56 }
57 }
57 }
58− }
58+ }
59 }
59 }
60Loader {
60Loader {
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;
66 }
66 }
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 {
101 }
101 }
102readonly property int headerHeight: titleLabel.height + subtitleLabel.height + subtitleLabel.anchors.topMargin;
102readonly property int headerHeight: titleLabel.height + subtitleLabel.height + subtitleLabel.anchors.topMargin;
103Label {
103Label {
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);
112− }
112+ }
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;
132− }
132+ }
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;
141 }
141 }
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;
149− }
149+ }
150− return root.pressed;
150+ return root.pressed;
151− }
151+ }
152− radius: "medium";
152+ radius: "medium";
153− borderSource: "radius_pressed.sci"
153+ borderSource: "radius_pressed.sci"
154− }
154+}
155implicitHeight: subtitleLabel.y + subtitleLabel.height + units.gu(1);
155implicitHeight: subtitleLabel.y + subtitleLabel.height + units.gu(1);
156}
156}
tests/plugins/Dash/cardcreator/6.res+45−46
@@ -1,18 +1,18 @@
1−AbstractButton {
1+AbstractButton {
2− id: root;
2+ id: root;
3− property var template;
3+ property var template;
4− property var components;
4+ property var components;
5− property var cardData;
5+ property var cardData;
6− property var artShapeBorderSource: undefined;
6+ property var artShapeBorderSource: undefined;
7− property real fontScale: 1.0;
7+ property real fontScale: 1.0;
8− property var scopeStyle: null;
8+ property var scopeStyle: null;
9− property int titleAlignment: Text.AlignLeft;
9+ property int titleAlignment: Text.AlignLeft;
10− property int fixedHeaderHeight: -1;
10+ property int fixedHeaderHeight: -1;
11− property size fixedArtShapeSize: Qt.size(-1, -1);
11+ property size fixedArtShapeSize: Qt.size(-1, -1);
12− readonly property string title: cardData && cardData["title"] || "";
12+ readonly property string title: cardData && cardData["title"] || "";
13− property bool asynchronous: true;
13+ property bool asynchronous: true;
14− property bool showHeader: true;
14+ property bool showHeader: true;
15− implicitWidth: childrenRect.width;
15+ implicitWidth: childrenRect.width;
16Loader {
16Loader {
17 id: backgroundLoader;
17 id: backgroundLoader;
18 objectName: "backgroundLoader";
18 objectName: "backgroundLoader";
@@ -51,10 +51,10 @@ readonly property int headerHeight: titleLabel.height + subtitleLabel.height + s
51Item {
51Item {
52 id: headerTitleContainer;
52 id: headerTitleContainer;
53 anchors { right: parent.right; left: parent.left;
53 anchors { right: parent.right; left: parent.left;
54−top: parent.top;
54+ top: parent.top;
55− topMargin: units.gu(1);
55+ topMargin: units.gu(1);
56−leftMargin: units.gu(1);
56+ leftMargin: units.gu(1);
57− }
57+ }
58 width: parent.width - x;
58 width: parent.width - x;
59 implicitHeight: titleLabel.height + subtitleLabel.height;
59 implicitHeight: titleLabel.height + subtitleLabel.height;
60 data: [
60 data: [
@@ -62,15 +62,15 @@ leftMargin: units.gu(1);
62 id: titleLabel;
62 id: titleLabel;
63 objectName: "titleLabel";
63 objectName: "titleLabel";
64 anchors { right: emblemIcon.left;
64 anchors { right: emblemIcon.left;
65− rightMargin: emblemIcon.width > 0 ? units.gu(0.5) : 0;
65+ rightMargin: emblemIcon.width > 0 ? units.gu(0.5) : 0;
66−left: parent.left;
66+ left: parent.left;
67− top: parent.top; }
67+ top: parent.top; }
68 elide: Text.ElideRight;
68 elide: Text.ElideRight;
69 fontSize: "small";
69 fontSize: "small";
70 wrapMode: Text.Wrap;
70 wrapMode: Text.Wrap;
71 maximumLineCount: 2;
71 maximumLineCount: 2;
72 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
72 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
73− color: backgroundLoader.active && backgroundLoader.item && root.scopeStyle ? root.scopeStyle.getTextColor(backgroundLoader.item.luminance) : (backgroundLoader.item && backgroundLoader.item.luminance > 0.7 ? Theme.palette.normal.baseText : "white");
73+ color: backgroundLoader.active && backgroundLoader.item && root.scopeStyle ? root.scopeStyle.getTextColor(backgroundLoader.item.luminance) : (backgroundLoader.item && backgroundLoader.item.luminance > 0.7 ? Theme.palette.normal.baseText : "white");
74 visible: showHeader ;
74 visible: showHeader ;
75 text: root.title;
75 text: root.title;
76 font.weight: cardData && cardData["subtitle"] ? Font.DemiBold : Font.Normal;
76 font.weight: cardData && cardData["subtitle"] ? Font.DemiBold : Font.Normal;
@@ -80,15 +80,15 @@ left: parent.left;
80 id: subtitleLabel;
80 id: subtitleLabel;
81 objectName: "subtitleLabel";
81 objectName: "subtitleLabel";
82 anchors { right: parent.right;
82 anchors { right: parent.right;
83− left: parent.left;
83+ left: parent.left;
84−rightMargin: units.gu(1);
84+ rightMargin: units.gu(1);
85−top: titleLabel.bottom;
85+ top: titleLabel.bottom;
86− }
86+ }
87 anchors.topMargin: units.dp(2);
87 anchors.topMargin: units.dp(2);
88 elide: Text.ElideRight;
88 elide: Text.ElideRight;
89 fontSize: "x-small";
89 fontSize: "x-small";
90 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
90 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
91− color: backgroundLoader.active && backgroundLoader.item && root.scopeStyle ? root.scopeStyle.getTextColor(backgroundLoader.item.luminance) : (backgroundLoader.item && backgroundLoader.item.luminance > 0.7 ? Theme.palette.normal.baseText : "white");
91+ color: backgroundLoader.active && backgroundLoader.item && root.scopeStyle ? root.scopeStyle.getTextColor(backgroundLoader.item.luminance) : (backgroundLoader.item && backgroundLoader.item.luminance > 0.7 ? Theme.palette.normal.baseText : "white");
92 visible: titleLabel.visible && titleLabel.text;
92 visible: titleLabel.visible && titleLabel.text;
93 text: cardData && cardData["subtitle"] || "";
93 text: cardData && cardData["subtitle"] || "";
94 font.weight: Font.Light;
94 font.weight: Font.Light;
@@ -97,30 +97,29 @@ top: titleLabel.bottom;
97 id: emblemIcon;
97 id: emblemIcon;
98 objectName: "emblemIcon";
98 objectName: "emblemIcon";
99 anchors {
99 anchors {
100− bottom: titleLabel.baseline;
100+ bottom: titleLabel.baseline;
101− right: parent.right;
101+ right: parent.right;
102− rightMargin: units.gu(1);
102+ rightMargin: units.gu(1);
103−
104 }
103 }
105 source: cardData && cardData["emblem"] || "";
104 source: cardData && cardData["emblem"] || "";
106− color: backgroundLoader.active && backgroundLoader.item && root.scopeStyle ? root.scopeStyle.getTextColor(backgroundLoader.item.luminance) : (backgroundLoader.item && backgroundLoader.item.luminance > 0.7 ? Theme.palette.normal.baseText : "white");
105+ color: backgroundLoader.active && backgroundLoader.item && root.scopeStyle ? root.scopeStyle.getTextColor(backgroundLoader.item.luminance) : (backgroundLoader.item && backgroundLoader.item.luminance > 0.7 ? Theme.palette.normal.baseText : "white");
107 height: source != "" ? titleLabel.font.pixelSize : 0;
106 height: source != "" ? titleLabel.font.pixelSize : 0;
108 }
107 }
109
108
110 ]
109 ]
111 }
110 }
112−UbuntuShape {
111+UbuntuShape {
113− id: touchdown;
112+ id: touchdown;
114− objectName: "touchdown";
113+ objectName: "touchdown";
115− anchors { fill: backgroundLoader }
114+ anchors { fill: backgroundLoader }
116− visible: {
115+ visible: {
117− if (root.template && root.template["non-interactive"]) {
116+ if (root.template && root.template["non-interactive"]) {
118− return false;
117+ return false;
119− }
118+ }
120− return root.pressed;
119+ return root.pressed;
121− }
120+ }
122− radius: "medium";
121+ radius: "medium";
123− borderSource: "radius_pressed.sci"
122+ borderSource: "radius_pressed.sci"
124− }
123+}
125implicitHeight: headerTitleContainer.y + headerTitleContainer.height + units.gu(1);
124implicitHeight: headerTitleContainer.y + headerTitleContainer.height + units.gu(1);
126}
125}
tests/plugins/Dash/cardcreator/7.res+41−40
@@ -55,25 +55,26 @@ Row {
55 spacing: margins;
55 spacing: margins;
56 height: root.fixedHeaderHeight != -1 ? root.fixedHeaderHeight : implicitHeight;
56 height: root.fixedHeaderHeight != -1 ? root.fixedHeaderHeight : implicitHeight;
57 anchors { top: parent.top;
57 anchors { top: parent.top;
58− topMargin: units.gu(1);
58+ topMargin: units.gu(1);
59−left: parent.left;
59+ left: parent.left;
60− }
60+ }
61 anchors.right: parent.right;
61 anchors.right: parent.right;
62− anchors.margins: margins;
62+ anchors.margins: margins;
63− anchors.rightMargin: 0;
63+ anchors.rightMargin: 0;
64 data: [
64 data: [
65− CroppedImageMinimumSourceSize {
65+CroppedImageMinimumSourceSize {
66 id: mascotImage;
66 id: mascotImage;
67 objectName: "mascotImage";
67 objectName: "mascotImage";
68 anchors { verticalCenter: parent.verticalCenter; }
68 anchors { verticalCenter: parent.verticalCenter; }
69− property bool doLoadSource: !NetworkingStatus.limitedBandwith;
69+ property bool doLoadSource: !NetworkingStatus.limitedBandwith;
70− source: { if (root.visible) doLoadSource = true; return doLoadSource && cardData && cardData["mascot"] || ""; }
70+ source: { if (root.visible) doLoadSource = true; return doLoadSource && cardData && cardData["mascot"] || ""; }
71− width: units.gu(6);
71+ width: units.gu(6);
72 height: units.gu(5.625);
72 height: units.gu(5.625);
73 horizontalAlignment: Image.AlignHCenter;
73 horizontalAlignment: Image.AlignHCenter;
74 verticalAlignment: Image.AlignVCenter;
74 verticalAlignment: Image.AlignVCenter;
75− visible: showHeader && resized;
75+ visible: showHeader && resized;
76 }
76 }
77+
77,Item {
78,Item {
78 id: headerTitleContainer;
79 id: headerTitleContainer;
79 anchors { verticalCenter: parent.verticalCenter; }
80 anchors { verticalCenter: parent.verticalCenter; }
@@ -84,15 +85,15 @@ left: parent.left;
84 id: titleLabel;
85 id: titleLabel;
85 objectName: "titleLabel";
86 objectName: "titleLabel";
86 anchors { right: parent.right;
87 anchors { right: parent.right;
87−rightMargin: units.gu(1);
88+ rightMargin: units.gu(1);
88−left: parent.left;
89+ left: parent.left;
89− top: parent.top; }
90+ top: parent.top; }
90 elide: Text.ElideRight;
91 elide: Text.ElideRight;
91 fontSize: "small";
92 fontSize: "small";
92 wrapMode: Text.Wrap;
93 wrapMode: Text.Wrap;
93 maximumLineCount: 2;
94 maximumLineCount: 2;
94 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
95 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
95− color: backgroundLoader.active && backgroundLoader.item && root.scopeStyle ? root.scopeStyle.getTextColor(backgroundLoader.item.luminance) : (backgroundLoader.item && backgroundLoader.item.luminance > 0.7 ? Theme.palette.normal.baseText : "white");
96+ color: backgroundLoader.active && backgroundLoader.item && root.scopeStyle ? root.scopeStyle.getTextColor(backgroundLoader.item.luminance) : (backgroundLoader.item && backgroundLoader.item.luminance > 0.7 ? Theme.palette.normal.baseText : "white");
96 visible: showHeader ;
97 visible: showHeader ;
97 text: root.title;
98 text: root.title;
98 font.weight: cardData && cardData["subtitle"] ? Font.DemiBold : Font.Normal;
99 font.weight: cardData && cardData["subtitle"] ? Font.DemiBold : Font.Normal;
@@ -102,15 +103,15 @@ left: parent.left;
102 id: subtitleLabel;
103 id: subtitleLabel;
103 objectName: "subtitleLabel";
104 objectName: "subtitleLabel";
104 anchors { right: parent.right;
105 anchors { right: parent.right;
105− left: parent.left;
106+ left: parent.left;
106−rightMargin: units.gu(1);
107+ rightMargin: units.gu(1);
107−top: titleLabel.bottom;
108+ top: titleLabel.bottom;
108− }
109+ }
109 anchors.topMargin: units.dp(2);
110 anchors.topMargin: units.dp(2);
110 elide: Text.ElideRight;
111 elide: Text.ElideRight;
111 fontSize: "x-small";
112 fontSize: "x-small";
112 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
113 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
113− color: backgroundLoader.active && backgroundLoader.item && root.scopeStyle ? root.scopeStyle.getTextColor(backgroundLoader.item.luminance) : (backgroundLoader.item && backgroundLoader.item.luminance > 0.7 ? Theme.palette.normal.baseText : "white");
114+ color: backgroundLoader.active && backgroundLoader.item && root.scopeStyle ? root.scopeStyle.getTextColor(backgroundLoader.item.luminance) : (backgroundLoader.item && backgroundLoader.item.luminance > 0.7 ? Theme.palette.normal.baseText : "white");
114 visible: titleLabel.visible && titleLabel.text;
115 visible: titleLabel.visible && titleLabel.text;
115 text: cardData && cardData["subtitle"] || "";
116 text: cardData && cardData["subtitle"] || "";
116 font.weight: Font.Light;
117 font.weight: Font.Light;
@@ -118,33 +119,33 @@ top: titleLabel.bottom;
118,CardAttributes {
119,CardAttributes {
119 id: attributesRow;
120 id: attributesRow;
120 objectName: "attributesRow";
121 objectName: "attributesRow";
121− anchors { right: parent.right;
122+ anchors { right: parent.right;
122− left: parent.left;
123+ left: parent.left;
123−rightMargin: units.gu(1);
124+ rightMargin: units.gu(1);
124−top: subtitleLabel.bottom;
125+ top: subtitleLabel.bottom;
125− }
126+ }
126− color: backgroundLoader.active && backgroundLoader.item && root.scopeStyle ? root.scopeStyle.getTextColor(backgroundLoader.item.luminance) : (backgroundLoader.item && backgroundLoader.item.luminance > 0.7 ? Theme.palette.normal.baseText : "white");
127+ color: backgroundLoader.active && backgroundLoader.item && root.scopeStyle ? root.scopeStyle.getTextColor(backgroundLoader.item.luminance) : (backgroundLoader.item && backgroundLoader.item.luminance > 0.7 ? Theme.palette.normal.baseText : "white");
127 fontScale: root.fontScale;
128 fontScale: root.fontScale;
128 model: cardData && cardData["attributes"];
129 model: cardData && cardData["attributes"];
129 }
130 }
130
131
131− ]
132+ ]
132− }
133+ }
133
134
134 ]
135 ]
135 }
136 }
136−UbuntuShape {
137+UbuntuShape {
137− id: touchdown;
138+ id: touchdown;
138− objectName: "touchdown";
139+ objectName: "touchdown";
139− anchors { fill: backgroundLoader }
140+ anchors { fill: backgroundLoader }
140− visible: {
141+ visible: {
141− if (root.template && root.template["non-interactive"]) {
142+ if (root.template && root.template["non-interactive"]) {
142− return false;
143+ return false;
143− }
144+ }
144− return root.pressed;
145+ return root.pressed;
145− }
146+ }
146− radius: "medium";
147+ radius: "medium";
147− borderSource: "radius_pressed.sci"
148+ borderSource: "radius_pressed.sci"
148− }
149+}
149implicitHeight: row.y + row.height + units.gu(1);
150implicitHeight: row.y + row.height + units.gu(1);
150}
151}