on xenial help sign in
Fix CardCreator tests.
a641572Michał Sawicz
plugins/Dash/CardCreator.js+1−1
@@ -289,7 +289,7 @@ function cardString(template, components) {
289 property var cardData; \n\
289 property var cardData; \n\
290 property var artShapeBorderSource: undefined; \n\
290 property var artShapeBorderSource: undefined; \n\
291 property real fontScale: 1.0; \n\
291 property real fontScale: 1.0; \n\
292− property var scopeStyle: null \n\
292+ property var scopeStyle: null; \n\
293 property int headerAlignment: Text.AlignLeft; \n\
293 property int headerAlignment: Text.AlignLeft; \n\
294 property int fixedHeaderHeight: -1; \n\
294 property int fixedHeaderHeight: -1; \n\
295 property size fixedArtShapeSize: Qt.size(-1, -1); \n\
295 property size fixedArtShapeSize: Qt.size(-1, -1); \n\
tests/plugins/Dash/cardcreator/1.res+2−2
@@ -5,7 +5,7 @@ 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 styleTool: Object({ foreground: "grey" })
8+ property var scopeStyle: null;
9 property int headerAlignment: Text.AlignLeft;
9 property int headerAlignment: 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);
@@ -76,7 +76,7 @@ leftMargin: units.gu(1);
76 wrapMode: Text.Wrap;
76 wrapMode: Text.Wrap;
77 maximumLineCount: 2;
77 maximumLineCount: 2;
78 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
78 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
79− color: root.styleTool.foreground;
79+ color: root.scopeStyle ? root.scopeStyle.foreground : "grey";
80 visible: showHeader ;
80 visible: showHeader ;
81 text: root.title;
81 text: root.title;
82 font.weight: components && components["subtitle"] ? Font.DemiBold : Font.Normal;
82 font.weight: components && components["subtitle"] ? Font.DemiBold : Font.Normal;
tests/plugins/Dash/cardcreator/2.res+4−4
@@ -5,7 +5,7 @@ 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 styleTool: Object({ foreground: "grey" })
8+ property var scopeStyle: null;
9 property int headerAlignment: Text.AlignLeft;
9 property int headerAlignment: 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);
@@ -66,7 +66,7 @@ data: [ Image {
66 anchors { verticalCenter: parent.verticalCenter; }
66 anchors { verticalCenter: parent.verticalCenter; }
67 readonly property int maxSize: Math.max(width, height) * 4;
67 readonly property int maxSize: Math.max(width, height) * 4;
68 source: cardData && cardData["mascot"];
68 source: cardData && cardData["mascot"];
69− width: units.gu(6);
69+ width: units.gu(6);
70 height: units.gu(5.625);
70 height: units.gu(5.625);
71 sourceSize { width: maxSize; height: maxSize }
71 sourceSize { width: maxSize; height: maxSize }
72 fillMode: Image.PreserveAspectCrop;
72 fillMode: Image.PreserveAspectCrop;
@@ -88,7 +88,7 @@ Column {
88 wrapMode: Text.Wrap;
88 wrapMode: Text.Wrap;
89 maximumLineCount: 2;
89 maximumLineCount: 2;
90 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
90 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
91− color: backgroundLoader.active && backgroundLoader.item && backgroundLoader.item.luminance < 0.7 ? "white" : root.styleTool.foreground;
91+ color: backgroundLoader.active && backgroundLoader.item && backgroundLoader.item.luminance < 0.7 ? "white" : (root.scopeStyle ? root.scopeStyle.foreground : "grey");
92 visible: showHeader ;
92 visible: showHeader ;
93 text: root.title;
93 text: root.title;
94 font.weight: components && components["subtitle"] ? Font.DemiBold : Font.Normal;
94 font.weight: components && components["subtitle"] ? Font.DemiBold : Font.Normal;
@@ -103,7 +103,7 @@ Label {
103 elide: Text.ElideRight;
103 elide: Text.ElideRight;
104 fontSize: "small";
104 fontSize: "small";
105 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
105 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
106− color: backgroundLoader.active && backgroundLoader.item && backgroundLoader.item.luminance < 0.7 ? "white" : root.styleTool.foreground;
106+ color: backgroundLoader.active && backgroundLoader.item && backgroundLoader.item.luminance < 0.7 ? "white" : (root.scopeStyle ? root.scopeStyle.foreground : "grey");
107 visible: titleLabel.visible && titleLabel.text;
107 visible: titleLabel.visible && titleLabel.text;
108 text: cardData && cardData["subtitle"] || "";
108 text: cardData && cardData["subtitle"] || "";
109 font.weight: Font.Light;
109 font.weight: Font.Light;
tests/plugins/Dash/cardcreator/3.res+3−3
@@ -5,7 +5,7 @@ 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 styleTool: Object({ foreground: "grey" })
8+ property var scopeStyle: null;
9 property int headerAlignment: Text.AlignLeft;
9 property int headerAlignment: 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);
@@ -76,7 +76,7 @@ leftMargin: units.gu(1);
76 wrapMode: Text.Wrap;
76 wrapMode: Text.Wrap;
77 maximumLineCount: 2;
77 maximumLineCount: 2;
78 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
78 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
79− color: root.styleTool.foreground;
79+ color: root.scopeStyle ? root.scopeStyle.foreground : "grey";
80 visible: showHeader ;
80 visible: showHeader ;
81 text: root.title;
81 text: root.title;
82 font.weight: components && components["subtitle"] ? Font.DemiBold : Font.Normal;
82 font.weight: components && components["subtitle"] ? Font.DemiBold : Font.Normal;
@@ -94,7 +94,7 @@ Label {
94 elide: Text.ElideRight;
94 elide: Text.ElideRight;
95 fontSize: "small";
95 fontSize: "small";
96 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
96 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
97− color: root.styleTool.foreground;
97+ color: root.scopeStyle ? root.scopeStyle.foreground : "grey";
98 visible: titleLabel.visible && titleLabel.text;
98 visible: titleLabel.visible && titleLabel.text;
99 text: cardData && cardData["subtitle"] || "";
99 text: cardData && cardData["subtitle"] || "";
100 font.weight: Font.Light;
100 font.weight: Font.Light;
tests/plugins/Dash/cardcreator/4.res+3−3
@@ -5,7 +5,7 @@ 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 styleTool: Object({ foreground: "grey" })
8+ property var scopeStyle: null;
9 property int headerAlignment: Text.AlignLeft;
9 property int headerAlignment: 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);
@@ -69,7 +69,7 @@ data: [ Label {
69 wrapMode: Text.Wrap;
69 wrapMode: Text.Wrap;
70 maximumLineCount: 2;
70 maximumLineCount: 2;
71 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
71 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
72− color: root.styleTool.foreground;
72+ color: root.scopeStyle ? root.scopeStyle.foreground : "grey";
73 visible: showHeader ;
73 visible: showHeader ;
74 text: root.title;
74 text: root.title;
75 font.weight: components && components["subtitle"] ? Font.DemiBold : Font.Normal;
75 font.weight: components && components["subtitle"] ? Font.DemiBold : Font.Normal;
@@ -84,7 +84,7 @@ Label {
84 elide: Text.ElideRight;
84 elide: Text.ElideRight;
85 fontSize: "small";
85 fontSize: "small";
86 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
86 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
87− color: root.styleTool.foreground;
87+ color: root.scopeStyle ? root.scopeStyle.foreground : "grey";
88 visible: titleLabel.visible && titleLabel.text;
88 visible: titleLabel.visible && titleLabel.text;
89 text: cardData && cardData["subtitle"] || "";
89 text: cardData && cardData["subtitle"] || "";
90 font.weight: Font.Light;
90 font.weight: Font.Light;
tests/plugins/Dash/cardcreator/5.res+1−1
@@ -5,7 +5,7 @@ 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 styleTool: Object({ foreground: "grey" })
8+ property var scopeStyle: null;
9 property int headerAlignment: Text.AlignLeft;
9 property int headerAlignment: 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);