on xenial help sign in
Replace all occurences of "grey" in dash with palette-sourced colour.
commitd6249e8e304f7b7860476d9a8f36e79428700c12 authorMichał Sawicz <michal.sawicz@canonical.com> dateWed 13 Aug 2014, 12:29 (12 years ago) parent75875f6
24 files changed+47−47
plugins/Dash/CardCreator.js+4−4 plugins/Dash/ScopeStyle.qml+1−1 qml/Components/PageHeader.qml+2−2 qml/Dash/DashNavigation.qml+2−2 qml/Dash/DashNavigationList.qml+1−1 qml/Dash/GenericScopeView.qml+2−2 qml/Dash/Previews/PreviewAudioPlayback.qml+3−3 qml/Dash/Previews/PreviewExpandable.qml+1−1 qml/Dash/Previews/PreviewHeader.qml+1−1 qml/Dash/Previews/PreviewRatingDisplay.qml+2−2 qml/Dash/Previews/PreviewRatingInput.qml+2−2 qml/Dash/Previews/PreviewTextSummary.qml+2−2 tests/plugins/Dash/cardcreator/1.res+1−1 tests/plugins/Dash/cardcreator/2.res+2−2 tests/plugins/Dash/cardcreator/3.res+2−2 tests/plugins/Dash/cardcreator/4.res+2−2 tests/plugins/Dash/cardcreator/5.res+2−2 tests/plugins/Dash/cardcreator/6.res+3−3 tests/plugins/Dash/cardcreator/7.res+3−3 tests/plugins/Dash/tst_ScopeStyle.qml+4−4 tests/qmltests/Components/tst_LazyImage.qml+1−1 tests/qmltests/Components/tst_PageHeader.qml+1−1 tests/qmltests/Dash/tst_Card.qml+1−1 tests/qmltests/Dash/tst_GenericScopeView.qml+2−2
plugins/Dash/CardCreator.js+4−4
@@ -439,20 +439,20 @@ function cardString(template, components) {
439439 mascotCode = kMascotImageCode.arg(mascotAnchors).arg(mascotImageVisible);
440440 }
441441
442− var summaryColorWithBackground = 'backgroundLoader.active && backgroundLoader.item && backgroundLoader.item.luminance < (root.scopeStyle ? root.scopeStyle.threshold : 0.7) ? (root.scopeStyle ? root.scopeStyle.light : "white") : (root.scopeStyle ? root.scopeStyle.dark : "grey")';
442+ var summaryColorWithBackground = 'backgroundLoader.active && backgroundLoader.item && backgroundLoader.item.luminance < (root.scopeStyle ? root.scopeStyle.threshold : 0.7) ? (root.scopeStyle ? root.scopeStyle.light : "white") : (root.scopeStyle ? root.scopeStyle.dark : Theme.palette.normal.baseText)';
443443
444444 var hasTitleContainer = hasTitle && (hasEmblem || (hasMascot && (hasSubtitle || hasAttributes)));
445445 var titleSubtitleCode = '';
446446 if (hasTitle) {
447447 var titleColor;
448448 if (headerAsOverlay) {
449− titleColor = 'overlayLoader.item.luminance < (root.scopeStyle ? root.scopeStyle.threshold : 0.7) ? (root.scopeStyle ? root.scopeStyle.light : "white") : (root.scopeStyle ? root.scopeStyle.dark : "grey")';
449+ titleColor = 'overlayLoader.item.luminance < (root.scopeStyle ? root.scopeStyle.threshold : 0.7) ? (root.scopeStyle ? root.scopeStyle.light : "white") : (root.scopeStyle ? root.scopeStyle.dark : Theme.palette.normal.baseText)';
450450 } else if (hasSummary) {
451451 titleColor = 'summary.color';
452452 } else if (hasBackground) {
453453 titleColor = summaryColorWithBackground;
454454 } else {
455− titleColor = 'root.scopeStyle ? root.scopeStyle.foreground : "grey"';
455+ titleColor = 'root.scopeStyle ? root.scopeStyle.foreground : Theme.palette.normal.baseText';
456456 }
457457
458458 var titleAnchors;
@@ -604,7 +604,7 @@ function cardString(template, components) {
604604 if (hasBackground) {
605605 summaryColor = summaryColorWithBackground;
606606 } else {
607− summaryColor = 'root.scopeStyle ? root.scopeStyle.foreground : "grey"';
607+ summaryColor = 'root.scopeStyle ? root.scopeStyle.foreground : Theme.palette.normal.baseText';
608608 }
609609
610610 var summaryTopMargin = (hasMascot || hasSubtitle || hasAttributes ? 'anchors.margins' : '0');
plugins/Dash/ScopeStyle.qml+1−1
@@ -87,7 +87,7 @@ QtObject {
8787 property var d: QtObject {
8888 // FIXME: should be taken from the theme
8989 readonly property color defaultLight: "white"
90− readonly property color defaultDark: "grey"
90+ readonly property color defaultDark: Theme.palette.normal.baseText
9191 readonly property real defaultLightLuminance: luminance(defaultLight)
9292 readonly property real defaultDarkLuminance: luminance(defaultDark)
9393
qml/Components/PageHeader.qml+2−2
@@ -172,7 +172,7 @@ Item {
172172 property var styledItem: searchHeader
173173 property string title
174174 property var config: PageHeadConfiguration {
175− foregroundColor: root.scopeStyle ? root.scopeStyle.headerForeground : "grey"
175+ foregroundColor: root.scopeStyle ? root.scopeStyle.headerForeground : Theme.palette.normal.baseText
176176 backAction: Action {
177177 iconName: "back"
178178 onTriggered: {
@@ -242,7 +242,7 @@ Item {
242242 property var styledItem: header
243243 property string title: root.title
244244 property var config: PageHeadConfiguration {
245− foregroundColor: root.scopeStyle ? root.scopeStyle.headerForeground : "grey"
245+ foregroundColor: root.scopeStyle ? root.scopeStyle.headerForeground : Theme.palette.normal.baseText
246246 backAction: Action {
247247 iconName: "back"
248248 visible: root.showBackButton
qml/Dash/DashNavigation.qml+2−2
@@ -80,7 +80,7 @@ AbstractButton {
8080 anchors.margins: units.gu(2)
8181 verticalAlignment: Text.AlignVCenter
8282 text: root.currentNavigation ? root.currentNavigation.label : ""
83− color: root.scopeStyle ? root.scopeStyle.foreground : "grey"
83+ color: root.scopeStyle ? root.scopeStyle.foreground : Theme.palette.normal.baseText
8484 }
8585
8686 Icon {
@@ -90,7 +90,7 @@ AbstractButton {
9090 name: showList ? "up" : "down"
9191 height: units.gu(2)
9292 width: height
93− color: root.scopeStyle ? root.scopeStyle.foreground : "grey"
93+ color: root.scopeStyle ? root.scopeStyle.foreground : Theme.palette.normal.baseText
9494 }
9595
9696 // navigationListView is outside root
qml/Dash/DashNavigationList.qml+1−1
@@ -27,7 +27,7 @@ Item {
2727 signal allNavigationClicked()
2828
2929 readonly property int itemHeight: units.gu(5)
30− readonly property color foregroundColor: root.scopeStyle ? root.scopeStyle.foreground : "grey"
30+ readonly property color foregroundColor: root.scopeStyle ? root.scopeStyle.foreground : Theme.palette.normal.baseText
3131 implicitHeight: flickable.contentHeight
3232
3333 Rectangle {
qml/Dash/GenericScopeView.qml+2−2
@@ -364,7 +364,7 @@ FocusScope {
364364 }
365365 fontSize: "small"
366366 font.weight: Font.Bold
367− color: scopeStyle ? scopeStyle.foreground : "grey"
367+ color: scopeStyle ? scopeStyle.foreground : Theme.palette.normal.baseText
368368 visible: baseItem.expandable && !baseItem.headerLink
369369 }
370370 }
@@ -402,7 +402,7 @@ FocusScope {
402402 width: categoryView.width
403403 height: section != "" ? units.gu(5) : 0
404404 text: section
405− color: scopeStyle ? scopeStyle.foreground : "grey"
405+ color: scopeStyle ? scopeStyle.foreground : Theme.palette.normal.baseText
406406 iconName: delegate && delegate.headerLink ? "go-next" : ""
407407 onClicked: {
408408 if (delegate.headerLink) scopeView.scope.performQuery(delegate.headerLink);
qml/Dash/Previews/PreviewAudioPlayback.qml+3−3
@@ -139,7 +139,7 @@ PreviewWidget {
139139 objectName: "trackTitleLabel"
140140 anchors { top: parent.top; left: parent.left; right: parent.right }
141141 opacity: 0.9
142− color: scopeStyle ? scopeStyle.foreground : "grey"
142+ color: scopeStyle ? scopeStyle.foreground : Theme.palette.normal.baseText
143143 fontSize: "small"
144144 horizontalAlignment: Text.AlignLeft
145145 text: modelData["title"]
@@ -152,7 +152,7 @@ PreviewWidget {
152152 anchors { top: trackTitleLabel.bottom; left: parent.left; right: parent.right }
153153 visible: text !== ""
154154 opacity: 0.9
155− color: scopeStyle ? scopeStyle.foreground : "grey"
155+ color: scopeStyle ? scopeStyle.foreground : Theme.palette.normal.baseText
156156 font.weight: Font.Light
157157 fontSize: "small"
158158 horizontalAlignment: Text.AlignLeft
@@ -193,7 +193,7 @@ PreviewWidget {
193193 anchors.verticalCenter: parent.verticalCenter
194194 width: parent.column3Width
195195 opacity: 0.9
196− color: scopeStyle ? scopeStyle.foreground : "grey"
196+ color: scopeStyle ? scopeStyle.foreground : Theme.palette.normal.baseText
197197 fontSize: "small"
198198 horizontalAlignment: Text.AlignRight
199199 text: audio.lengthToString(modelData["length"])
qml/Dash/Previews/PreviewExpandable.qml+1−1
@@ -41,7 +41,7 @@ PreviewWidget {
4141 right: expandButton.left
4242 }
4343 fontSize: "large"
44− color: root.scopeStyle ? root.scopeStyle.foreground : "grey"
44+ color: root.scopeStyle ? root.scopeStyle.foreground : Theme.palette.normal.baseText
4545 visible: text !== ""
4646 opacity: .8
4747 text: widgetData["title"] || ""
qml/Dash/Previews/PreviewHeader.qml+1−1
@@ -35,7 +35,7 @@ PreviewWidget {
3535 readonly property url mascot: root.widgetData["mascot"] || ""
3636 readonly property string title: root.widgetData["title"] || ""
3737 readonly property string subtitle: root.widgetData["subtitle"] || ""
38− readonly property color fontColor: root.scopeStyle ? root.scopeStyle.foreground : "grey"
38+ readonly property color fontColor: root.scopeStyle ? root.scopeStyle.foreground : Theme.palette.normal.baseText
3939
4040 implicitHeight: row.height + row.margins * 2
4141 width: parent.width
qml/Dash/Previews/PreviewRatingDisplay.qml+2−2
@@ -72,7 +72,7 @@ PreviewWidget {
7272 id: authorLabel
7373 objectName: "authorLabel"
7474 anchors { left: parent.left; right: parent.right }
75− color: scopeStyle ? scopeStyle.foreground : "grey"
75+ color: scopeStyle ? scopeStyle.foreground : Theme.palette.normal.baseText
7676 opacity: .8
7777 text: modelData["author"] || ""
7878 visible: text !== ""
@@ -83,7 +83,7 @@ PreviewWidget {
8383 id: reviewLabel
8484 objectName: "reviewLabel"
8585 anchors { left: parent.left; right: parent.right }
86− color: scopeStyle ? scopeStyle.foreground : "grey"
86+ color: scopeStyle ? scopeStyle.foreground : Theme.palette.normal.baseText
8787 opacity: .8
8888 text: modelData["review"] || ""
8989 visible: text !== ""
qml/Dash/Previews/PreviewRatingInput.qml+2−2
@@ -76,7 +76,7 @@ PreviewWidget {
7676 verticalCenter: parent.verticalCenter
7777 left: parent.left
7878 }
79− color: root.scopeStyle ? root.scopeStyle.foreground : "grey"
79+ color: root.scopeStyle ? root.scopeStyle.foreground : Theme.palette.normal.baseText
8080 opacity: .8
8181 text: widgetData["rating-label"] || i18n.tr("Rate this")
8282 }
@@ -121,7 +121,7 @@ PreviewWidget {
121121 left: parent.left
122122 right: parent.right
123123 }
124− color: root.scopeStyle ? root.scopeStyle.foreground : "grey"
124+ color: root.scopeStyle ? root.scopeStyle.foreground : Theme.palette.normal.baseText
125125 opacity: .8
126126 text: widgetData["review-label"] || i18n.tr("Add a review")
127127 }
qml/Dash/Previews/PreviewTextSummary.qml+2−2
@@ -39,7 +39,7 @@ PreviewWidget {
3939 }
4040 height: visible ? implicitHeight : 0
4141 fontSize: "large"
42− color: root.scopeStyle ? root.scopeStyle.foreground : "grey"
42+ color: root.scopeStyle ? root.scopeStyle.foreground : Theme.palette.normal.baseText
4343 visible: text !== ""
4444 opacity: .8
4545 text: widgetData["title"] || ""
@@ -61,7 +61,7 @@ PreviewWidget {
6161 clip: true
6262 fontSize: "small"
6363 lineHeight: 1.2
64− color: root.scopeStyle ? root.scopeStyle.foreground : "grey"
64+ color: root.scopeStyle ? root.scopeStyle.foreground : Theme.palette.normal.baseText
6565 opacity: .8
6666 text: widgetData["text"]
6767 wrapMode: Text.Wrap
tests/plugins/Dash/cardcreator/1.res+1−1
@@ -70,7 +70,7 @@ Label {
7070 wrapMode: Text.Wrap;
7171 maximumLineCount: 2;
7272 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
73− color: root.scopeStyle ? root.scopeStyle.foreground : "grey";
73+ color: root.scopeStyle ? root.scopeStyle.foreground : Theme.palette.normal.baseText;
7474 visible: showHeader ;
7575 text: root.title;
7676 font.weight: components && components["subtitle"] ? Font.DemiBold : Font.Normal;
tests/plugins/Dash/cardcreator/2.res+2−2
@@ -94,7 +94,7 @@ Image {
9494 wrapMode: Text.Wrap;
9595 maximumLineCount: 2;
9696 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
97− color: backgroundLoader.active && backgroundLoader.item && backgroundLoader.item.luminance < (root.scopeStyle ? root.scopeStyle.threshold : 0.7) ? (root.scopeStyle ? root.scopeStyle.light : "white") : (root.scopeStyle ? root.scopeStyle.dark : "grey");
97+ color: backgroundLoader.active && backgroundLoader.item && backgroundLoader.item.luminance < (root.scopeStyle ? root.scopeStyle.threshold : 0.7) ? (root.scopeStyle ? root.scopeStyle.light : "white") : (root.scopeStyle ? root.scopeStyle.dark : Theme.palette.normal.baseText);
9898 visible: showHeader ;
9999 text: root.title;
100100 font.weight: components && components["subtitle"] ? Font.DemiBold : Font.Normal;
@@ -112,7 +112,7 @@ Image {
112112 elide: Text.ElideRight;
113113 fontSize: "small";
114114 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
115− color: backgroundLoader.active && backgroundLoader.item && backgroundLoader.item.luminance < (root.scopeStyle ? root.scopeStyle.threshold : 0.7) ? (root.scopeStyle ? root.scopeStyle.light : "white") : (root.scopeStyle ? root.scopeStyle.dark : "grey");
115+ color: backgroundLoader.active && backgroundLoader.item && backgroundLoader.item.luminance < (root.scopeStyle ? root.scopeStyle.threshold : 0.7) ? (root.scopeStyle ? root.scopeStyle.light : "white") : (root.scopeStyle ? root.scopeStyle.dark : Theme.palette.normal.baseText);
116116 visible: titleLabel.visible && titleLabel.text;
117117 text: cardData && cardData["subtitle"] || "";
118118 font.weight: Font.Light;
tests/plugins/Dash/cardcreator/3.res+2−2
@@ -70,7 +70,7 @@ Label {
7070 wrapMode: Text.Wrap;
7171 maximumLineCount: 2;
7272 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
73− color: root.scopeStyle ? root.scopeStyle.foreground : "grey";
73+ color: root.scopeStyle ? root.scopeStyle.foreground : Theme.palette.normal.baseText;
7474 visible: showHeader ;
7575 text: root.title;
7676 font.weight: components && components["subtitle"] ? Font.DemiBold : Font.Normal;
@@ -88,7 +88,7 @@ Label {
8888 elide: Text.ElideRight;
8989 fontSize: "small";
9090 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
91− color: root.scopeStyle ? root.scopeStyle.foreground : "grey";
91+ color: root.scopeStyle ? root.scopeStyle.foreground : Theme.palette.normal.baseText;
9292 visible: titleLabel.visible && titleLabel.text;
9393 text: cardData && cardData["subtitle"] || "";
9494 font.weight: Font.Light;
tests/plugins/Dash/cardcreator/4.res+2−2
@@ -74,7 +74,7 @@ Label {
7474 wrapMode: Text.Wrap;
7575 maximumLineCount: 2;
7676 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
77− color: root.scopeStyle ? root.scopeStyle.foreground : "grey";
77+ color: root.scopeStyle ? root.scopeStyle.foreground : Theme.palette.normal.baseText;
7878 visible: showHeader ;
7979 text: root.title;
8080 font.weight: components && components["subtitle"] ? Font.DemiBold : Font.Normal;
@@ -92,7 +92,7 @@ Label {
9292 elide: Text.ElideRight;
9393 fontSize: "small";
9494 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
95− color: root.scopeStyle ? root.scopeStyle.foreground : "grey";
95+ color: root.scopeStyle ? root.scopeStyle.foreground : Theme.palette.normal.baseText;
9696 visible: titleLabel.visible && titleLabel.text;
9797 text: cardData && cardData["subtitle"] || "";
9898 font.weight: Font.Light;
tests/plugins/Dash/cardcreator/5.res+2−2
@@ -113,7 +113,7 @@ Label {
113113 wrapMode: Text.Wrap;
114114 maximumLineCount: 2;
115115 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
116− color: overlayLoader.item.luminance < (root.scopeStyle ? root.scopeStyle.threshold : 0.7) ? (root.scopeStyle ? root.scopeStyle.light : "white") : (root.scopeStyle ? root.scopeStyle.dark : "grey");
116+ color: overlayLoader.item.luminance < (root.scopeStyle ? root.scopeStyle.threshold : 0.7) ? (root.scopeStyle ? root.scopeStyle.light : "white") : (root.scopeStyle ? root.scopeStyle.dark : Theme.palette.normal.baseText);
117117 visible: showHeader && overlayLoader.active;
118118 text: root.title;
119119 font.weight: components && components["subtitle"] ? Font.DemiBold : Font.Normal;
@@ -131,7 +131,7 @@ Label {
131131 elide: Text.ElideRight;
132132 fontSize: "small";
133133 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
134− color: overlayLoader.item.luminance < (root.scopeStyle ? root.scopeStyle.threshold : 0.7) ? (root.scopeStyle ? root.scopeStyle.light : "white") : (root.scopeStyle ? root.scopeStyle.dark : "grey");
134+ color: overlayLoader.item.luminance < (root.scopeStyle ? root.scopeStyle.threshold : 0.7) ? (root.scopeStyle ? root.scopeStyle.light : "white") : (root.scopeStyle ? root.scopeStyle.dark : Theme.palette.normal.baseText);
135135 visible: titleLabel.visible && titleLabel.text;
136136 text: cardData && cardData["subtitle"] || "";
137137 font.weight: Font.Light;
tests/plugins/Dash/cardcreator/6.res+3−3
@@ -70,7 +70,7 @@ Item {
7070 wrapMode: Text.Wrap;
7171 maximumLineCount: 2;
7272 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
73− color: backgroundLoader.active && backgroundLoader.item && backgroundLoader.item.luminance < (root.scopeStyle ? root.scopeStyle.threshold : 0.7) ? (root.scopeStyle ? root.scopeStyle.light : "white") : (root.scopeStyle ? root.scopeStyle.dark : "grey");
73+ color: backgroundLoader.active && backgroundLoader.item && backgroundLoader.item.luminance < (root.scopeStyle ? root.scopeStyle.threshold : 0.7) ? (root.scopeStyle ? root.scopeStyle.light : "white") : (root.scopeStyle ? root.scopeStyle.dark : Theme.palette.normal.baseText);
7474 visible: showHeader ;
7575 text: root.title;
7676 font.weight: components && components["subtitle"] ? Font.DemiBold : Font.Normal;
@@ -88,7 +88,7 @@ Item {
8888 elide: Text.ElideRight;
8989 fontSize: "small";
9090 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
91− color: backgroundLoader.active && backgroundLoader.item && backgroundLoader.item.luminance < (root.scopeStyle ? root.scopeStyle.threshold : 0.7) ? (root.scopeStyle ? root.scopeStyle.light : "white") : (root.scopeStyle ? root.scopeStyle.dark : "grey");
91+ color: backgroundLoader.active && backgroundLoader.item && backgroundLoader.item.luminance < (root.scopeStyle ? root.scopeStyle.threshold : 0.7) ? (root.scopeStyle ? root.scopeStyle.light : "white") : (root.scopeStyle ? root.scopeStyle.dark : Theme.palette.normal.baseText);
9292 visible: titleLabel.visible && titleLabel.text;
9393 text: cardData && cardData["subtitle"] || "";
9494 font.weight: Font.Light;
@@ -103,7 +103,7 @@ Item {
103103 rightMargin: units.gu(1);
104104 }
105105 source: cardData && cardData["emblem"] || "";
106− color: backgroundLoader.active && backgroundLoader.item && backgroundLoader.item.luminance < (root.scopeStyle ? root.scopeStyle.threshold : 0.7) ? (root.scopeStyle ? root.scopeStyle.light : "white") : (root.scopeStyle ? root.scopeStyle.dark : "grey");
106+ color: backgroundLoader.active && backgroundLoader.item && backgroundLoader.item.luminance < (root.scopeStyle ? root.scopeStyle.threshold : 0.7) ? (root.scopeStyle ? root.scopeStyle.light : "white") : (root.scopeStyle ? root.scopeStyle.dark : Theme.palette.normal.baseText);
107107 width: height;
108108 height: source != "" ? titleLabel.font.pixelSize : 0;
109109 }
tests/plugins/Dash/cardcreator/7.res+3−3
@@ -95,7 +95,7 @@ Image {
9595 wrapMode: Text.Wrap;
9696 maximumLineCount: 2;
9797 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
98− color: backgroundLoader.active && backgroundLoader.item && backgroundLoader.item.luminance < (root.scopeStyle ? root.scopeStyle.threshold : 0.7) ? (root.scopeStyle ? root.scopeStyle.light : "white") : (root.scopeStyle ? root.scopeStyle.dark : "grey");
98+ color: backgroundLoader.active && backgroundLoader.item && backgroundLoader.item.luminance < (root.scopeStyle ? root.scopeStyle.threshold : 0.7) ? (root.scopeStyle ? root.scopeStyle.light : "white") : (root.scopeStyle ? root.scopeStyle.dark : Theme.palette.normal.baseText);
9999 visible: showHeader ;
100100 text: root.title;
101101 font.weight: components && components["subtitle"] ? Font.DemiBold : Font.Normal;
@@ -113,7 +113,7 @@ Image {
113113 elide: Text.ElideRight;
114114 fontSize: "small";
115115 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
116− color: backgroundLoader.active && backgroundLoader.item && backgroundLoader.item.luminance < (root.scopeStyle ? root.scopeStyle.threshold : 0.7) ? (root.scopeStyle ? root.scopeStyle.light : "white") : (root.scopeStyle ? root.scopeStyle.dark : "grey");
116+ color: backgroundLoader.active && backgroundLoader.item && backgroundLoader.item.luminance < (root.scopeStyle ? root.scopeStyle.threshold : 0.7) ? (root.scopeStyle ? root.scopeStyle.light : "white") : (root.scopeStyle ? root.scopeStyle.dark : Theme.palette.normal.baseText);
117117 visible: titleLabel.visible && titleLabel.text;
118118 text: cardData && cardData["subtitle"] || "";
119119 font.weight: Font.Light;
@@ -127,7 +127,7 @@ Image {
127127 rightMargin: units.gu(1);
128128 top: subtitleLabel.bottom;
129129 }
130− color: backgroundLoader.active && backgroundLoader.item && backgroundLoader.item.luminance < (root.scopeStyle ? root.scopeStyle.threshold : 0.7) ? (root.scopeStyle ? root.scopeStyle.light : "white") : (root.scopeStyle ? root.scopeStyle.dark : "grey");
130+ color: backgroundLoader.active && backgroundLoader.item && backgroundLoader.item.luminance < (root.scopeStyle ? root.scopeStyle.threshold : 0.7) ? (root.scopeStyle ? root.scopeStyle.light : "white") : (root.scopeStyle ? root.scopeStyle.dark : Theme.palette.normal.baseText);
131131 model: cardData && cardData["attributes"];
132132 }
133133
tests/plugins/Dash/tst_ScopeStyle.qml+4−4
@@ -67,7 +67,7 @@ Rectangle {
6767
6868 function test_foreground_data() {
6969 return [
70− { tag: "default", index: 0, foreground: "grey", luminance: 0.5020 },
70+ { tag: "default", index: 0, foreground: Theme.palette.normal.foreground, luminance: 0.5725 },
7171 { tag: "red on black", index: 1, foreground: "red", luminance: 0.2126 },
7272 { tag: "green on white", index: 2, foreground: "green", luminance: 0.3590 },
7373 { tag: "blue on darkgrey", index: 3, foreground: "blue", luminance: 0.0722 },
@@ -101,7 +101,7 @@ Rectangle {
101101
102102 function test_threshold_data() {
103103 return [
104− { tag: "default", index: 0, threshold: 0.7510 },
104+ { tag: "default", index: 0, threshold: 0.7863 },
105105 { tag: "red on black", index: 1, threshold: 0.1063 },
106106 { tag: "green on white", index: 2, threshold: 0.6795 },
107107 { tag: "blue on darkgrey", index: 3, threshold: 0.3675 },
@@ -130,7 +130,7 @@ Rectangle {
130130
131131 function test_dark_data() {
132132 return [
133− { tag: "default", index: 0, dark: "grey" },
133+ { tag: "default", index: 0, dark: Theme.palette.normal.baseText },
134134 { tag: "red on black", index: 1, dark: "black" },
135135 { tag: "green on white", index: 2, dark: "green" },
136136 { tag: "blue on darkgrey", index: 3, dark: "blue" },
@@ -157,7 +157,7 @@ Rectangle {
157157
158158 function test_headerForeground_data() {
159159 return [
160− { tag: "default", index: 0, headerForeground: "grey" },
160+ { tag: "default", index: 0, headerForeground: Theme.palette.normal.baseText },
161161 { tag: "black", index: 2, headerForeground: "black" },
162162 ];
163163 }
tests/qmltests/Components/tst_LazyImage.qml+1−1
@@ -32,7 +32,7 @@ Rectangle {
3232 rightMargin: 2 * parent.width / 3
3333 }
3434
35− color: "grey"
35+ color: Theme.palette.normal.baseText
3636
3737 Column {
3838 anchors { fill: parent; margins: units.gu(5) }
tests/qmltests/Components/tst_PageHeader.qml+1−1
@@ -242,7 +242,7 @@ Item {
242242 searchEntryEnabled: true
243243 title: "%^$%^%^&%^&%^$%GHR%"
244244 scopeStyle: QtObject {
245− readonly property color foreground: "grey"
245+ readonly property color foreground: Theme.palette.normal.baseText
246246 readonly property url headerLogo: showImageCheckBox.checked ? pageHeader.titleImageSource : ""
247247 }
248248 showBackButton: showBackButtonCheckBox.checked
tests/qmltests/Dash/tst_Card.qml+1−1
@@ -452,7 +452,7 @@ Rectangle {
452452
453453 background.color = data.tag;
454454
455− var fontColor = data.dark ? "grey" : "white";
455+ var fontColor = data.dark ? Theme.palette.normal.baseText : "white";
456456
457457 tryCompareFunction(function() { return Qt.colorEqual(summary.color, fontColor); }, true);
458458 tryCompareFunction(function() { return Qt.colorEqual(title.color, fontColor); }, true);
tests/qmltests/Dash/tst_GenericScopeView.qml+2−2
@@ -333,9 +333,9 @@ Item {
333333
334334 function test_header_style_data() {
335335 return [
336− { tag: "Default", index: 0, foreground: "grey", background: "", logo: "" },
336+ { tag: "Default", index: 0, foreground: Theme.palette.normal.baseText, background: "", logo: "" },
337337 { tag: "Foreground", index: 1, foreground: "yellow", background: "", logo: "" },
338− { tag: "Logo+Background", index: 2, foreground: "grey", background: "gradient:///lightgrey/grey",
338+ { tag: "Logo+Background", index: 2, foreground: Theme.palette.normal.baseText, background: "gradient:///lightgrey/grey",
339339 logo: Qt.resolvedUrl("../Components/tst_PageHeader/logo-ubuntu-orange.svg") },
340340 ];
341341 }