on xenial help sign in
Fix cardcreator tests.
commitbd64f97cc4a64320bb9063794134c8a0384d5fcf authorMichał Sawicz <michal.sawicz@canonical.com> dateSat 5 Jul 2014, 13:58 (12 years ago) parentb2d0dd2
6 files changed+22−17
plugins/Dash/CardCreator.js+1−1 tests/plugins/Dash/cardcreator/1.res+3−2 tests/plugins/Dash/cardcreator/2.res+5−5 tests/plugins/Dash/cardcreator/3.res+6−4 tests/plugins/Dash/cardcreator/4.res+4−3 tests/plugins/Dash/cardcreator/5.res+3−2
plugins/Dash/CardCreator.js+1−1
@@ -289,7 +289,7 @@ function cardString(template, components) {
289289 property var cardData; \n\
290290 property var artShapeBorderSource: undefined; \n\
291291 property real fontScale: 1.0; \n\
292− property color foregroundColor: "gray"; \n\
292+ property color foregroundColor: "grey"; \n\
293293 property int headerAlignment: Text.AlignLeft; \n\
294294 property int fixedHeaderHeight: -1; \n\
295295 property size fixedArtShapeSize: Qt.size(-1, -1); \n\
tests/plugins/Dash/cardcreator/1.res+3−2
@@ -5,7 +5,8 @@ AbstractButton {
55 property var cardData;
66 property var artShapeBorderSource: undefined;
77 property real fontScale: 1.0;
8− property int headerAlignment: Text.AlignLeft;
8+ property color foregroundColor: "grey";
9+ property int headerAlignment: Text.AlignLeft;
910 property int fixedHeaderHeight: -1;
1011 property size fixedArtShapeSize: Qt.size(-1, -1);
1112 readonly property string title: cardData && cardData["title"] || "";
@@ -75,7 +76,7 @@ leftMargin: units.gu(1);
7576 wrapMode: Text.Wrap;
7677 maximumLineCount: 2;
7778 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
78− color: "grey";
79+ color: root.foregroundColor;
7980 visible: showHeader ;
8081 text: root.title;
8182 font.weight: components && components["subtitle"] ? Font.DemiBold : Font.Normal;
tests/plugins/Dash/cardcreator/2.res+5−5
@@ -5,7 +5,8 @@ AbstractButton {
55 property var cardData;
66 property var artShapeBorderSource: undefined;
77 property real fontScale: 1.0;
8− property int headerAlignment: Text.AlignLeft;
8+ property color foregroundColor: "grey";
9+ property int headerAlignment: Text.AlignLeft;
910 property int fixedHeaderHeight: -1;
1011 property size fixedArtShapeSize: Qt.size(-1, -1);
1112 readonly property string title: cardData && cardData["title"] || "";
@@ -78,8 +79,7 @@ Column {
7879 anchors.verticalCenter: parent.verticalCenter;
7980 spacing: units.dp(2);
8081 width: parent.width - x;
81− data: [
82−Label {
82+ data: [ Label {
8383 id: titleLabel;
8484 objectName: "titleLabel";
8585 anchors { left: parent.left; right: parent.right }
@@ -88,7 +88,7 @@ Label {
8888 wrapMode: Text.Wrap;
8989 maximumLineCount: 2;
9090 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;
9292 visible: showHeader ;
9393 text: root.title;
9494 font.weight: components && components["subtitle"] ? Font.DemiBold : Font.Normal;
@@ -103,7 +103,7 @@ Label {
103103 elide: Text.ElideRight;
104104 fontSize: "small";
105105 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;
107107 visible: titleLabel.visible && titleLabel.text;
108108 text: cardData && cardData["subtitle"] || "";
109109 font.weight: Font.Light;
tests/plugins/Dash/cardcreator/3.res+6−4
@@ -5,7 +5,8 @@ AbstractButton {
55 property var cardData;
66 property var artShapeBorderSource: undefined;
77 property real fontScale: 1.0;
8− property int headerAlignment: Text.AlignLeft;
8+ property color foregroundColor: "grey";
9+ property int headerAlignment: Text.AlignLeft;
910 property int fixedHeaderHeight: -1;
1011 property size fixedArtShapeSize: Qt.size(-1, -1);
1112 readonly property string title: cardData && cardData["title"] || "";
@@ -75,7 +76,7 @@ leftMargin: units.gu(1);
7576 wrapMode: Text.Wrap;
7677 maximumLineCount: 2;
7778 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
78− color: "grey";
79+ color: root.foregroundColor;
7980 visible: showHeader ;
8081 text: root.title;
8182 font.weight: components && components["subtitle"] ? Font.DemiBold : Font.Normal;
@@ -88,11 +89,12 @@ Label {
8889 leftMargin: titleLabel.leftMargin;
8990 right: titleLabel.right;
9091 top: titleLabel.bottom;
91− topMargin: units.dp(2); }
92+ topMargin: units.dp(2);
93+ }
9294 elide: Text.ElideRight;
9395 fontSize: "small";
9496 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
95− color: "grey";
97+ color: root.foregroundColor;
9698 visible: titleLabel.visible && titleLabel.text;
9799 text: cardData && cardData["subtitle"] || "";
98100 font.weight: Font.Light;
tests/plugins/Dash/cardcreator/4.res+4−3
@@ -5,7 +5,8 @@ AbstractButton {
55 property var cardData;
66 property var artShapeBorderSource: undefined;
77 property real fontScale: 1.0;
8− property int headerAlignment: Text.AlignLeft;
8+ property color foregroundColor: "grey";
9+ property int headerAlignment: Text.AlignLeft;
910 property int fixedHeaderHeight: -1;
1011 property size fixedArtShapeSize: Qt.size(-1, -1);
1112 readonly property string title: cardData && cardData["title"] || "";
@@ -68,7 +69,7 @@ data: [ Label {
6869 wrapMode: Text.Wrap;
6970 maximumLineCount: 2;
7071 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
71− color: "grey";
72+ color: root.foregroundColor;
7273 visible: showHeader ;
7374 text: root.title;
7475 font.weight: components && components["subtitle"] ? Font.DemiBold : Font.Normal;
@@ -83,7 +84,7 @@ Label {
8384 elide: Text.ElideRight;
8485 fontSize: "small";
8586 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
86− color: "grey";
87+ color: root.foregroundColor;
8788 visible: titleLabel.visible && titleLabel.text;
8889 text: cardData && cardData["subtitle"] || "";
8990 font.weight: Font.Light;
tests/plugins/Dash/cardcreator/5.res+3−2
@@ -4,8 +4,9 @@ AbstractButton {
44 property var components;
55 property var cardData;
66 property var artShapeBorderSource: undefined;
7− property real fontScale: 1.0;
8− property int headerAlignment: Text.AlignLeft;
7+ property real fontScale: 1.0;
8+ property color foregroundColor: "grey";
9+ property int headerAlignment: Text.AlignLeft;
910 property int fixedHeaderHeight: -1;
1011 property size fixedArtShapeSize: Qt.size(-1, -1);
1112 readonly property string title: cardData && cardData["title"] || "";