on xenial help sign in
Fix cardcreator tests.
bd64f97Michał 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 color foregroundColor: "gray"; \n\
292+ property color foregroundColor: "grey"; \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+3−2
@@ -5,7 +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 color foregroundColor: "grey";
8− property int headerAlignment: Text.AlignLeft;
9+ property int headerAlignment: Text.AlignLeft;
9 property int fixedHeaderHeight: -1;
10 property int fixedHeaderHeight: -1;
10 property size fixedArtShapeSize: Qt.size(-1, -1);
11 property size fixedArtShapeSize: Qt.size(-1, -1);
11 readonly property string title: cardData && cardData["title"] || "";
12 readonly property string title: cardData && cardData["title"] || "";
@@ -75,7 +76,7 @@ leftMargin: units.gu(1);
75 wrapMode: Text.Wrap;
76 wrapMode: Text.Wrap;
76 maximumLineCount: 2;
77 maximumLineCount: 2;
77 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
78 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
78− color: "grey";
79+ color: root.foregroundColor;
79 visible: showHeader ;
80 visible: showHeader ;
80 text: root.title;
81 text: root.title;
81 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+5−5
@@ -5,7 +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 color foregroundColor: "grey";
8− property int headerAlignment: Text.AlignLeft;
9+ property int headerAlignment: Text.AlignLeft;
9 property int fixedHeaderHeight: -1;
10 property int fixedHeaderHeight: -1;
10 property size fixedArtShapeSize: Qt.size(-1, -1);
11 property size fixedArtShapeSize: Qt.size(-1, -1);
11 readonly property string title: cardData && cardData["title"] || "";
12 readonly property string title: cardData && cardData["title"] || "";
@@ -78,8 +79,7 @@ Column {
78 anchors.verticalCenter: parent.verticalCenter;
79 anchors.verticalCenter: parent.verticalCenter;
79 spacing: units.dp(2);
80 spacing: units.dp(2);
80 width: parent.width - x;
81 width: parent.width - x;
81− data: [
82−Label {
82+ data: [ Label {
83 id: titleLabel;
83 id: titleLabel;
84 objectName: "titleLabel";
84 objectName: "titleLabel";
85 anchors { left: parent.left; right: parent.right }
85 anchors { left: parent.left; right: parent.right }
@@ -88,7 +88,7 @@ Label {
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" : "grey";
91+ color: backgroundLoader.active && backgroundLoader.item && backgroundLoader.item.luminance < 0.7 ? "white" : root.foregroundColor;
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" : "grey";
106+ color: backgroundLoader.active && backgroundLoader.item && backgroundLoader.item.luminance < 0.7 ? "white" : root.foregroundColor;
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+6−4
@@ -5,7 +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 color foregroundColor: "grey";
8− property int headerAlignment: Text.AlignLeft;
9+ property int headerAlignment: Text.AlignLeft;
9 property int fixedHeaderHeight: -1;
10 property int fixedHeaderHeight: -1;
10 property size fixedArtShapeSize: Qt.size(-1, -1);
11 property size fixedArtShapeSize: Qt.size(-1, -1);
11 readonly property string title: cardData && cardData["title"] || "";
12 readonly property string title: cardData && cardData["title"] || "";
@@ -75,7 +76,7 @@ leftMargin: units.gu(1);
75 wrapMode: Text.Wrap;
76 wrapMode: Text.Wrap;
76 maximumLineCount: 2;
77 maximumLineCount: 2;
77 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
78 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
78− color: "grey";
79+ color: root.foregroundColor;
79 visible: showHeader ;
80 visible: showHeader ;
80 text: root.title;
81 text: root.title;
81 font.weight: components && components["subtitle"] ? Font.DemiBold : Font.Normal;
82 font.weight: components && components["subtitle"] ? Font.DemiBold : Font.Normal;
@@ -88,11 +89,12 @@ Label {
88 leftMargin: titleLabel.leftMargin;
89 leftMargin: titleLabel.leftMargin;
89 right: titleLabel.right;
90 right: titleLabel.right;
90 top: titleLabel.bottom;
91 top: titleLabel.bottom;
91− topMargin: units.dp(2); }
92+ topMargin: units.dp(2);
93+ }
92 elide: Text.ElideRight;
94 elide: Text.ElideRight;
93 fontSize: "small";
95 fontSize: "small";
94 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
96 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
95− color: "grey";
97+ color: root.foregroundColor;
96 visible: titleLabel.visible && titleLabel.text;
98 visible: titleLabel.visible && titleLabel.text;
97 text: cardData && cardData["subtitle"] || "";
99 text: cardData && cardData["subtitle"] || "";
98 font.weight: Font.Light;
100 font.weight: Font.Light;
tests/plugins/Dash/cardcreator/4.res+4−3
@@ -5,7 +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 color foregroundColor: "grey";
8− property int headerAlignment: Text.AlignLeft;
9+ property int headerAlignment: Text.AlignLeft;
9 property int fixedHeaderHeight: -1;
10 property int fixedHeaderHeight: -1;
10 property size fixedArtShapeSize: Qt.size(-1, -1);
11 property size fixedArtShapeSize: Qt.size(-1, -1);
11 readonly property string title: cardData && cardData["title"] || "";
12 readonly property string title: cardData && cardData["title"] || "";
@@ -68,7 +69,7 @@ data: [ Label {
68 wrapMode: Text.Wrap;
69 wrapMode: Text.Wrap;
69 maximumLineCount: 2;
70 maximumLineCount: 2;
70 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
71 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
71− color: "grey";
72+ color: root.foregroundColor;
72 visible: showHeader ;
73 visible: showHeader ;
73 text: root.title;
74 text: root.title;
74 font.weight: components && components["subtitle"] ? Font.DemiBold : Font.Normal;
75 font.weight: components && components["subtitle"] ? Font.DemiBold : Font.Normal;
@@ -83,7 +84,7 @@ Label {
83 elide: Text.ElideRight;
84 elide: Text.ElideRight;
84 fontSize: "small";
85 fontSize: "small";
85 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
86 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
86− color: "grey";
87+ color: root.foregroundColor;
87 visible: titleLabel.visible && titleLabel.text;
88 visible: titleLabel.visible && titleLabel.text;
88 text: cardData && cardData["subtitle"] || "";
89 text: cardData && cardData["subtitle"] || "";
89 font.weight: Font.Light;
90 font.weight: Font.Light;
tests/plugins/Dash/cardcreator/5.res+3−2
@@ -4,8 +4,9 @@ AbstractButton {
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 color foregroundColor: "grey";
8− property int headerAlignment: Text.AlignLeft;
9+ property int headerAlignment: Text.AlignLeft;
9 property int fixedHeaderHeight: -1;
10 property int fixedHeaderHeight: -1;
10 property size fixedArtShapeSize: Qt.size(-1, -1);
11 property size fixedArtShapeSize: Qt.size(-1, -1);
11 readonly property string title: cardData && cardData["title"] || "";
12 readonly property string title: cardData && cardData["title"] || "";