on xenial help sign in
Fix CardCreator tests.
commita6415723d3d0ee5c29fd97ac585b691356e77563 authorMichał Sawicz <michal.sawicz@canonical.com> dateTue 8 Jul 2014, 14:37 (12 years ago) parente55cd60
6 files changed+14−14
plugins/Dash/CardCreator.js+1−1 tests/plugins/Dash/cardcreator/1.res+2−2 tests/plugins/Dash/cardcreator/2.res+4−4 tests/plugins/Dash/cardcreator/3.res+3−3 tests/plugins/Dash/cardcreator/4.res+3−3 tests/plugins/Dash/cardcreator/5.res+1−1
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 var scopeStyle: null \n\
292+ property var scopeStyle: null; \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+2−2
@@ -5,7 +5,7 @@ AbstractButton {
55 property var cardData;
66 property var artShapeBorderSource: undefined;
77 property real fontScale: 1.0;
8− property var styleTool: Object({ foreground: "grey" })
8+ property var scopeStyle: null;
99 property int headerAlignment: Text.AlignLeft;
1010 property int fixedHeaderHeight: -1;
1111 property size fixedArtShapeSize: Qt.size(-1, -1);
@@ -76,7 +76,7 @@ leftMargin: units.gu(1);
7676 wrapMode: Text.Wrap;
7777 maximumLineCount: 2;
7878 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
79− color: root.styleTool.foreground;
79+ color: root.scopeStyle ? root.scopeStyle.foreground : "grey";
8080 visible: showHeader ;
8181 text: root.title;
8282 font.weight: components && components["subtitle"] ? Font.DemiBold : Font.Normal;
tests/plugins/Dash/cardcreator/2.res+4−4
@@ -5,7 +5,7 @@ AbstractButton {
55 property var cardData;
66 property var artShapeBorderSource: undefined;
77 property real fontScale: 1.0;
8− property var styleTool: Object({ foreground: "grey" })
8+ property var scopeStyle: null;
99 property int headerAlignment: Text.AlignLeft;
1010 property int fixedHeaderHeight: -1;
1111 property size fixedArtShapeSize: Qt.size(-1, -1);
@@ -66,7 +66,7 @@ data: [ Image {
6666 anchors { verticalCenter: parent.verticalCenter; }
6767 readonly property int maxSize: Math.max(width, height) * 4;
6868 source: cardData && cardData["mascot"];
69− width: units.gu(6);
69+ width: units.gu(6);
7070 height: units.gu(5.625);
7171 sourceSize { width: maxSize; height: maxSize }
7272 fillMode: Image.PreserveAspectCrop;
@@ -88,7 +88,7 @@ Column {
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" : root.styleTool.foreground;
91+ color: backgroundLoader.active && backgroundLoader.item && backgroundLoader.item.luminance < 0.7 ? "white" : (root.scopeStyle ? root.scopeStyle.foreground : "grey");
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" : root.styleTool.foreground;
106+ color: backgroundLoader.active && backgroundLoader.item && backgroundLoader.item.luminance < 0.7 ? "white" : (root.scopeStyle ? root.scopeStyle.foreground : "grey");
107107 visible: titleLabel.visible && titleLabel.text;
108108 text: cardData && cardData["subtitle"] || "";
109109 font.weight: Font.Light;
tests/plugins/Dash/cardcreator/3.res+3−3
@@ -5,7 +5,7 @@ AbstractButton {
55 property var cardData;
66 property var artShapeBorderSource: undefined;
77 property real fontScale: 1.0;
8− property var styleTool: Object({ foreground: "grey" })
8+ property var scopeStyle: null;
99 property int headerAlignment: Text.AlignLeft;
1010 property int fixedHeaderHeight: -1;
1111 property size fixedArtShapeSize: Qt.size(-1, -1);
@@ -76,7 +76,7 @@ leftMargin: units.gu(1);
7676 wrapMode: Text.Wrap;
7777 maximumLineCount: 2;
7878 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
79− color: root.styleTool.foreground;
79+ color: root.scopeStyle ? root.scopeStyle.foreground : "grey";
8080 visible: showHeader ;
8181 text: root.title;
8282 font.weight: components && components["subtitle"] ? Font.DemiBold : Font.Normal;
@@ -94,7 +94,7 @@ Label {
9494 elide: Text.ElideRight;
9595 fontSize: "small";
9696 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
97− color: root.styleTool.foreground;
97+ color: root.scopeStyle ? root.scopeStyle.foreground : "grey";
9898 visible: titleLabel.visible && titleLabel.text;
9999 text: cardData && cardData["subtitle"] || "";
100100 font.weight: Font.Light;
tests/plugins/Dash/cardcreator/4.res+3−3
@@ -5,7 +5,7 @@ AbstractButton {
55 property var cardData;
66 property var artShapeBorderSource: undefined;
77 property real fontScale: 1.0;
8− property var styleTool: Object({ foreground: "grey" })
8+ property var scopeStyle: null;
99 property int headerAlignment: Text.AlignLeft;
1010 property int fixedHeaderHeight: -1;
1111 property size fixedArtShapeSize: Qt.size(-1, -1);
@@ -69,7 +69,7 @@ data: [ Label {
6969 wrapMode: Text.Wrap;
7070 maximumLineCount: 2;
7171 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
72− color: root.styleTool.foreground;
72+ color: root.scopeStyle ? root.scopeStyle.foreground : "grey";
7373 visible: showHeader ;
7474 text: root.title;
7575 font.weight: components && components["subtitle"] ? Font.DemiBold : Font.Normal;
@@ -84,7 +84,7 @@ Label {
8484 elide: Text.ElideRight;
8585 fontSize: "small";
8686 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
87− color: root.styleTool.foreground;
87+ color: root.scopeStyle ? root.scopeStyle.foreground : "grey";
8888 visible: titleLabel.visible && titleLabel.text;
8989 text: cardData && cardData["subtitle"] || "";
9090 font.weight: Font.Light;
tests/plugins/Dash/cardcreator/5.res+1−1
@@ -5,7 +5,7 @@ AbstractButton {
55 property var cardData;
66 property var artShapeBorderSource: undefined;
77 property real fontScale: 1.0;
8− property var styleTool: Object({ foreground: "grey" })
8+ property var scopeStyle: null;
99 property int headerAlignment: Text.AlignLeft;
1010 property int fixedHeaderHeight: -1;
1111 property size fixedArtShapeSize: Qt.size(-1, -1);