on xenial help sign in
Replace all occurences of "grey" in dash with palette-sourced colour.
d6249e8Michał Sawicz
plugins/Dash/CardCreator.js+4−4
@@ -439,20 +439,20 @@ function cardString(template, components) {
439 mascotCode = kMascotImageCode.arg(mascotAnchors).arg(mascotImageVisible);
439 mascotCode = kMascotImageCode.arg(mascotAnchors).arg(mascotImageVisible);
440 }
440 }
441
441
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)';
443
443
444 var hasTitleContainer = hasTitle && (hasEmblem || (hasMascot && (hasSubtitle || hasAttributes)));
444 var hasTitleContainer = hasTitle && (hasEmblem || (hasMascot && (hasSubtitle || hasAttributes)));
445 var titleSubtitleCode = '';
445 var titleSubtitleCode = '';
446 if (hasTitle) {
446 if (hasTitle) {
447 var titleColor;
447 var titleColor;
448 if (headerAsOverlay) {
448 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)';
450 } else if (hasSummary) {
450 } else if (hasSummary) {
451 titleColor = 'summary.color';
451 titleColor = 'summary.color';
452 } else if (hasBackground) {
452 } else if (hasBackground) {
453 titleColor = summaryColorWithBackground;
453 titleColor = summaryColorWithBackground;
454 } else {
454 } else {
455− titleColor = 'root.scopeStyle ? root.scopeStyle.foreground : "grey"';
455+ titleColor = 'root.scopeStyle ? root.scopeStyle.foreground : Theme.palette.normal.baseText';
456 }
456 }
457
457
458 var titleAnchors;
458 var titleAnchors;
@@ -604,7 +604,7 @@ function cardString(template, components) {
604 if (hasBackground) {
604 if (hasBackground) {
605 summaryColor = summaryColorWithBackground;
605 summaryColor = summaryColorWithBackground;
606 } else {
606 } else {
607− summaryColor = 'root.scopeStyle ? root.scopeStyle.foreground : "grey"';
607+ summaryColor = 'root.scopeStyle ? root.scopeStyle.foreground : Theme.palette.normal.baseText';
608 }
608 }
609
609
610 var summaryTopMargin = (hasMascot || hasSubtitle || hasAttributes ? 'anchors.margins' : '0');
610 var summaryTopMargin = (hasMascot || hasSubtitle || hasAttributes ? 'anchors.margins' : '0');
plugins/Dash/ScopeStyle.qml+1−1
@@ -87,7 +87,7 @@ QtObject {
87 property var d: QtObject {
87 property var d: QtObject {
88 // FIXME: should be taken from the theme
88 // FIXME: should be taken from the theme
89 readonly property color defaultLight: "white"
89 readonly property color defaultLight: "white"
90− readonly property color defaultDark: "grey"
90+ readonly property color defaultDark: Theme.palette.normal.baseText
91 readonly property real defaultLightLuminance: luminance(defaultLight)
91 readonly property real defaultLightLuminance: luminance(defaultLight)
92 readonly property real defaultDarkLuminance: luminance(defaultDark)
92 readonly property real defaultDarkLuminance: luminance(defaultDark)
93
93
qml/Components/PageHeader.qml+2−2
@@ -172,7 +172,7 @@ Item {
172 property var styledItem: searchHeader
172 property var styledItem: searchHeader
173 property string title
173 property string title
174 property var config: PageHeadConfiguration {
174 property var config: PageHeadConfiguration {
175− foregroundColor: root.scopeStyle ? root.scopeStyle.headerForeground : "grey"
175+ foregroundColor: root.scopeStyle ? root.scopeStyle.headerForeground : Theme.palette.normal.baseText
176 backAction: Action {
176 backAction: Action {
177 iconName: "back"
177 iconName: "back"
178 onTriggered: {
178 onTriggered: {
@@ -242,7 +242,7 @@ Item {
242 property var styledItem: header
242 property var styledItem: header
243 property string title: root.title
243 property string title: root.title
244 property var config: PageHeadConfiguration {
244 property var config: PageHeadConfiguration {
245− foregroundColor: root.scopeStyle ? root.scopeStyle.headerForeground : "grey"
245+ foregroundColor: root.scopeStyle ? root.scopeStyle.headerForeground : Theme.palette.normal.baseText
246 backAction: Action {
246 backAction: Action {
247 iconName: "back"
247 iconName: "back"
248 visible: root.showBackButton
248 visible: root.showBackButton
qml/Dash/DashNavigation.qml+2−2
@@ -80,7 +80,7 @@ AbstractButton {
80 anchors.margins: units.gu(2)
80 anchors.margins: units.gu(2)
81 verticalAlignment: Text.AlignVCenter
81 verticalAlignment: Text.AlignVCenter
82 text: root.currentNavigation ? root.currentNavigation.label : ""
82 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
84 }
84 }
85
85
86 Icon {
86 Icon {
@@ -90,7 +90,7 @@ AbstractButton {
90 name: showList ? "up" : "down"
90 name: showList ? "up" : "down"
91 height: units.gu(2)
91 height: units.gu(2)
92 width: height
92 width: height
93− color: root.scopeStyle ? root.scopeStyle.foreground : "grey"
93+ color: root.scopeStyle ? root.scopeStyle.foreground : Theme.palette.normal.baseText
94 }
94 }
95
95
96 // navigationListView is outside root
96 // navigationListView is outside root
qml/Dash/DashNavigationList.qml+1−1
@@ -27,7 +27,7 @@ Item {
27 signal allNavigationClicked()
27 signal allNavigationClicked()
28
28
29 readonly property int itemHeight: units.gu(5)
29 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
31 implicitHeight: flickable.contentHeight
31 implicitHeight: flickable.contentHeight
32
32
33 Rectangle {
33 Rectangle {
qml/Dash/GenericScopeView.qml+2−2
@@ -364,7 +364,7 @@ FocusScope {
364 }
364 }
365 fontSize: "small"
365 fontSize: "small"
366 font.weight: Font.Bold
366 font.weight: Font.Bold
367− color: scopeStyle ? scopeStyle.foreground : "grey"
367+ color: scopeStyle ? scopeStyle.foreground : Theme.palette.normal.baseText
368 visible: baseItem.expandable && !baseItem.headerLink
368 visible: baseItem.expandable && !baseItem.headerLink
369 }
369 }
370 }
370 }
@@ -402,7 +402,7 @@ FocusScope {
402 width: categoryView.width
402 width: categoryView.width
403 height: section != "" ? units.gu(5) : 0
403 height: section != "" ? units.gu(5) : 0
404 text: section
404 text: section
405− color: scopeStyle ? scopeStyle.foreground : "grey"
405+ color: scopeStyle ? scopeStyle.foreground : Theme.palette.normal.baseText
406 iconName: delegate && delegate.headerLink ? "go-next" : ""
406 iconName: delegate && delegate.headerLink ? "go-next" : ""
407 onClicked: {
407 onClicked: {
408 if (delegate.headerLink) scopeView.scope.performQuery(delegate.headerLink);
408 if (delegate.headerLink) scopeView.scope.performQuery(delegate.headerLink);
qml/Dash/Previews/PreviewAudioPlayback.qml+3−3
@@ -139,7 +139,7 @@ PreviewWidget {
139 objectName: "trackTitleLabel"
139 objectName: "trackTitleLabel"
140 anchors { top: parent.top; left: parent.left; right: parent.right }
140 anchors { top: parent.top; left: parent.left; right: parent.right }
141 opacity: 0.9
141 opacity: 0.9
142− color: scopeStyle ? scopeStyle.foreground : "grey"
142+ color: scopeStyle ? scopeStyle.foreground : Theme.palette.normal.baseText
143 fontSize: "small"
143 fontSize: "small"
144 horizontalAlignment: Text.AlignLeft
144 horizontalAlignment: Text.AlignLeft
145 text: modelData["title"]
145 text: modelData["title"]
@@ -152,7 +152,7 @@ PreviewWidget {
152 anchors { top: trackTitleLabel.bottom; left: parent.left; right: parent.right }
152 anchors { top: trackTitleLabel.bottom; left: parent.left; right: parent.right }
153 visible: text !== ""
153 visible: text !== ""
154 opacity: 0.9
154 opacity: 0.9
155− color: scopeStyle ? scopeStyle.foreground : "grey"
155+ color: scopeStyle ? scopeStyle.foreground : Theme.palette.normal.baseText
156 font.weight: Font.Light
156 font.weight: Font.Light
157 fontSize: "small"
157 fontSize: "small"
158 horizontalAlignment: Text.AlignLeft
158 horizontalAlignment: Text.AlignLeft
@@ -193,7 +193,7 @@ PreviewWidget {
193 anchors.verticalCenter: parent.verticalCenter
193 anchors.verticalCenter: parent.verticalCenter
194 width: parent.column3Width
194 width: parent.column3Width
195 opacity: 0.9
195 opacity: 0.9
196− color: scopeStyle ? scopeStyle.foreground : "grey"
196+ color: scopeStyle ? scopeStyle.foreground : Theme.palette.normal.baseText
197 fontSize: "small"
197 fontSize: "small"
198 horizontalAlignment: Text.AlignRight
198 horizontalAlignment: Text.AlignRight
199 text: audio.lengthToString(modelData["length"])
199 text: audio.lengthToString(modelData["length"])
qml/Dash/Previews/PreviewExpandable.qml+1−1
@@ -41,7 +41,7 @@ PreviewWidget {
41 right: expandButton.left
41 right: expandButton.left
42 }
42 }
43 fontSize: "large"
43 fontSize: "large"
44− color: root.scopeStyle ? root.scopeStyle.foreground : "grey"
44+ color: root.scopeStyle ? root.scopeStyle.foreground : Theme.palette.normal.baseText
45 visible: text !== ""
45 visible: text !== ""
46 opacity: .8
46 opacity: .8
47 text: widgetData["title"] || ""
47 text: widgetData["title"] || ""
qml/Dash/Previews/PreviewHeader.qml+1−1
@@ -35,7 +35,7 @@ PreviewWidget {
35 readonly property url mascot: root.widgetData["mascot"] || ""
35 readonly property url mascot: root.widgetData["mascot"] || ""
36 readonly property string title: root.widgetData["title"] || ""
36 readonly property string title: root.widgetData["title"] || ""
37 readonly property string subtitle: root.widgetData["subtitle"] || ""
37 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
39
39
40 implicitHeight: row.height + row.margins * 2
40 implicitHeight: row.height + row.margins * 2
41 width: parent.width
41 width: parent.width
qml/Dash/Previews/PreviewRatingDisplay.qml+2−2
@@ -72,7 +72,7 @@ PreviewWidget {
72 id: authorLabel
72 id: authorLabel
73 objectName: "authorLabel"
73 objectName: "authorLabel"
74 anchors { left: parent.left; right: parent.right }
74 anchors { left: parent.left; right: parent.right }
75− color: scopeStyle ? scopeStyle.foreground : "grey"
75+ color: scopeStyle ? scopeStyle.foreground : Theme.palette.normal.baseText
76 opacity: .8
76 opacity: .8
77 text: modelData["author"] || ""
77 text: modelData["author"] || ""
78 visible: text !== ""
78 visible: text !== ""
@@ -83,7 +83,7 @@ PreviewWidget {
83 id: reviewLabel
83 id: reviewLabel
84 objectName: "reviewLabel"
84 objectName: "reviewLabel"
85 anchors { left: parent.left; right: parent.right }
85 anchors { left: parent.left; right: parent.right }
86− color: scopeStyle ? scopeStyle.foreground : "grey"
86+ color: scopeStyle ? scopeStyle.foreground : Theme.palette.normal.baseText
87 opacity: .8
87 opacity: .8
88 text: modelData["review"] || ""
88 text: modelData["review"] || ""
89 visible: text !== ""
89 visible: text !== ""
qml/Dash/Previews/PreviewRatingInput.qml+2−2
@@ -76,7 +76,7 @@ PreviewWidget {
76 verticalCenter: parent.verticalCenter
76 verticalCenter: parent.verticalCenter
77 left: parent.left
77 left: parent.left
78 }
78 }
79− color: root.scopeStyle ? root.scopeStyle.foreground : "grey"
79+ color: root.scopeStyle ? root.scopeStyle.foreground : Theme.palette.normal.baseText
80 opacity: .8
80 opacity: .8
81 text: widgetData["rating-label"] || i18n.tr("Rate this")
81 text: widgetData["rating-label"] || i18n.tr("Rate this")
82 }
82 }
@@ -121,7 +121,7 @@ PreviewWidget {
121 left: parent.left
121 left: parent.left
122 right: parent.right
122 right: parent.right
123 }
123 }
124− color: root.scopeStyle ? root.scopeStyle.foreground : "grey"
124+ color: root.scopeStyle ? root.scopeStyle.foreground : Theme.palette.normal.baseText
125 opacity: .8
125 opacity: .8
126 text: widgetData["review-label"] || i18n.tr("Add a review")
126 text: widgetData["review-label"] || i18n.tr("Add a review")
127 }
127 }
qml/Dash/Previews/PreviewTextSummary.qml+2−2
@@ -39,7 +39,7 @@ PreviewWidget {
39 }
39 }
40 height: visible ? implicitHeight : 0
40 height: visible ? implicitHeight : 0
41 fontSize: "large"
41 fontSize: "large"
42− color: root.scopeStyle ? root.scopeStyle.foreground : "grey"
42+ color: root.scopeStyle ? root.scopeStyle.foreground : Theme.palette.normal.baseText
43 visible: text !== ""
43 visible: text !== ""
44 opacity: .8
44 opacity: .8
45 text: widgetData["title"] || ""
45 text: widgetData["title"] || ""
@@ -61,7 +61,7 @@ PreviewWidget {
61 clip: true
61 clip: true
62 fontSize: "small"
62 fontSize: "small"
63 lineHeight: 1.2
63 lineHeight: 1.2
64− color: root.scopeStyle ? root.scopeStyle.foreground : "grey"
64+ color: root.scopeStyle ? root.scopeStyle.foreground : Theme.palette.normal.baseText
65 opacity: .8
65 opacity: .8
66 text: widgetData["text"]
66 text: widgetData["text"]
67 wrapMode: Text.Wrap
67 wrapMode: Text.Wrap
tests/plugins/Dash/cardcreator/1.res+1−1
@@ -70,7 +70,7 @@ Label {
70 wrapMode: Text.Wrap;
70 wrapMode: Text.Wrap;
71 maximumLineCount: 2;
71 maximumLineCount: 2;
72 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
72 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;
74 visible: showHeader ;
74 visible: showHeader ;
75 text: root.title;
75 text: root.title;
76 font.weight: components && components["subtitle"] ? Font.DemiBold : Font.Normal;
76 font.weight: components && components["subtitle"] ? Font.DemiBold : Font.Normal;
tests/plugins/Dash/cardcreator/2.res+2−2
@@ -94,7 +94,7 @@ Image {
94 wrapMode: Text.Wrap;
94 wrapMode: Text.Wrap;
95 maximumLineCount: 2;
95 maximumLineCount: 2;
96 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
96 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);
98 visible: showHeader ;
98 visible: showHeader ;
99 text: root.title;
99 text: root.title;
100 font.weight: components && components["subtitle"] ? Font.DemiBold : Font.Normal;
100 font.weight: components && components["subtitle"] ? Font.DemiBold : Font.Normal;
@@ -112,7 +112,7 @@ Image {
112 elide: Text.ElideRight;
112 elide: Text.ElideRight;
113 fontSize: "small";
113 fontSize: "small";
114 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
114 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);
116 visible: titleLabel.visible && titleLabel.text;
116 visible: titleLabel.visible && titleLabel.text;
117 text: cardData && cardData["subtitle"] || "";
117 text: cardData && cardData["subtitle"] || "";
118 font.weight: Font.Light;
118 font.weight: Font.Light;
tests/plugins/Dash/cardcreator/3.res+2−2
@@ -70,7 +70,7 @@ Label {
70 wrapMode: Text.Wrap;
70 wrapMode: Text.Wrap;
71 maximumLineCount: 2;
71 maximumLineCount: 2;
72 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
72 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;
74 visible: showHeader ;
74 visible: showHeader ;
75 text: root.title;
75 text: root.title;
76 font.weight: components && components["subtitle"] ? Font.DemiBold : Font.Normal;
76 font.weight: components && components["subtitle"] ? Font.DemiBold : Font.Normal;
@@ -88,7 +88,7 @@ Label {
88 elide: Text.ElideRight;
88 elide: Text.ElideRight;
89 fontSize: "small";
89 fontSize: "small";
90 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
90 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;
92 visible: titleLabel.visible && titleLabel.text;
92 visible: titleLabel.visible && titleLabel.text;
93 text: cardData && cardData["subtitle"] || "";
93 text: cardData && cardData["subtitle"] || "";
94 font.weight: Font.Light;
94 font.weight: Font.Light;
tests/plugins/Dash/cardcreator/4.res+2−2
@@ -74,7 +74,7 @@ Label {
74 wrapMode: Text.Wrap;
74 wrapMode: Text.Wrap;
75 maximumLineCount: 2;
75 maximumLineCount: 2;
76 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
76 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;
78 visible: showHeader ;
78 visible: showHeader ;
79 text: root.title;
79 text: root.title;
80 font.weight: components && components["subtitle"] ? Font.DemiBold : Font.Normal;
80 font.weight: components && components["subtitle"] ? Font.DemiBold : Font.Normal;
@@ -92,7 +92,7 @@ Label {
92 elide: Text.ElideRight;
92 elide: Text.ElideRight;
93 fontSize: "small";
93 fontSize: "small";
94 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
94 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;
96 visible: titleLabel.visible && titleLabel.text;
96 visible: titleLabel.visible && titleLabel.text;
97 text: cardData && cardData["subtitle"] || "";
97 text: cardData && cardData["subtitle"] || "";
98 font.weight: Font.Light;
98 font.weight: Font.Light;
tests/plugins/Dash/cardcreator/5.res+2−2
@@ -113,7 +113,7 @@ Label {
113 wrapMode: Text.Wrap;
113 wrapMode: Text.Wrap;
114 maximumLineCount: 2;
114 maximumLineCount: 2;
115 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
115 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);
117 visible: showHeader && overlayLoader.active;
117 visible: showHeader && overlayLoader.active;
118 text: root.title;
118 text: root.title;
119 font.weight: components && components["subtitle"] ? Font.DemiBold : Font.Normal;
119 font.weight: components && components["subtitle"] ? Font.DemiBold : Font.Normal;
@@ -131,7 +131,7 @@ Label {
131 elide: Text.ElideRight;
131 elide: Text.ElideRight;
132 fontSize: "small";
132 fontSize: "small";
133 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
133 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);
135 visible: titleLabel.visible && titleLabel.text;
135 visible: titleLabel.visible && titleLabel.text;
136 text: cardData && cardData["subtitle"] || "";
136 text: cardData && cardData["subtitle"] || "";
137 font.weight: Font.Light;
137 font.weight: Font.Light;
tests/plugins/Dash/cardcreator/6.res+3−3
@@ -70,7 +70,7 @@ Item {
70 wrapMode: Text.Wrap;
70 wrapMode: Text.Wrap;
71 maximumLineCount: 2;
71 maximumLineCount: 2;
72 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
72 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);
74 visible: showHeader ;
74 visible: showHeader ;
75 text: root.title;
75 text: root.title;
76 font.weight: components && components["subtitle"] ? Font.DemiBold : Font.Normal;
76 font.weight: components && components["subtitle"] ? Font.DemiBold : Font.Normal;
@@ -88,7 +88,7 @@ Item {
88 elide: Text.ElideRight;
88 elide: Text.ElideRight;
89 fontSize: "small";
89 fontSize: "small";
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 < (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);
92 visible: titleLabel.visible && titleLabel.text;
92 visible: titleLabel.visible && titleLabel.text;
93 text: cardData && cardData["subtitle"] || "";
93 text: cardData && cardData["subtitle"] || "";
94 font.weight: Font.Light;
94 font.weight: Font.Light;
@@ -103,7 +103,7 @@ Item {
103 rightMargin: units.gu(1);
103 rightMargin: units.gu(1);
104 }
104 }
105 source: cardData && cardData["emblem"] || "";
105 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);
107 width: height;
107 width: height;
108 height: source != "" ? titleLabel.font.pixelSize : 0;
108 height: source != "" ? titleLabel.font.pixelSize : 0;
109 }
109 }
tests/plugins/Dash/cardcreator/7.res+3−3
@@ -95,7 +95,7 @@ Image {
95 wrapMode: Text.Wrap;
95 wrapMode: Text.Wrap;
96 maximumLineCount: 2;
96 maximumLineCount: 2;
97 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
97 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);
99 visible: showHeader ;
99 visible: showHeader ;
100 text: root.title;
100 text: root.title;
101 font.weight: components && components["subtitle"] ? Font.DemiBold : Font.Normal;
101 font.weight: components && components["subtitle"] ? Font.DemiBold : Font.Normal;
@@ -113,7 +113,7 @@ Image {
113 elide: Text.ElideRight;
113 elide: Text.ElideRight;
114 fontSize: "small";
114 fontSize: "small";
115 font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
115 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);
117 visible: titleLabel.visible && titleLabel.text;
117 visible: titleLabel.visible && titleLabel.text;
118 text: cardData && cardData["subtitle"] || "";
118 text: cardData && cardData["subtitle"] || "";
119 font.weight: Font.Light;
119 font.weight: Font.Light;
@@ -127,7 +127,7 @@ Image {
127 rightMargin: units.gu(1);
127 rightMargin: units.gu(1);
128 top: subtitleLabel.bottom;
128 top: subtitleLabel.bottom;
129 }
129 }
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);
131 model: cardData && cardData["attributes"];
131 model: cardData && cardData["attributes"];
132 }
132 }
133
133
tests/plugins/Dash/tst_ScopeStyle.qml+4−4
@@ -67,7 +67,7 @@ Rectangle {
67
67
68 function test_foreground_data() {
68 function test_foreground_data() {
69 return [
69 return [
70− { tag: "default", index: 0, foreground: "grey", luminance: 0.5020 },
70+ { tag: "default", index: 0, foreground: Theme.palette.normal.foreground, luminance: 0.5725 },
71 { tag: "red on black", index: 1, foreground: "red", luminance: 0.2126 },
71 { tag: "red on black", index: 1, foreground: "red", luminance: 0.2126 },
72 { tag: "green on white", index: 2, foreground: "green", luminance: 0.3590 },
72 { tag: "green on white", index: 2, foreground: "green", luminance: 0.3590 },
73 { tag: "blue on darkgrey", index: 3, foreground: "blue", luminance: 0.0722 },
73 { tag: "blue on darkgrey", index: 3, foreground: "blue", luminance: 0.0722 },
@@ -101,7 +101,7 @@ Rectangle {
101
101
102 function test_threshold_data() {
102 function test_threshold_data() {
103 return [
103 return [
104− { tag: "default", index: 0, threshold: 0.7510 },
104+ { tag: "default", index: 0, threshold: 0.7863 },
105 { tag: "red on black", index: 1, threshold: 0.1063 },
105 { tag: "red on black", index: 1, threshold: 0.1063 },
106 { tag: "green on white", index: 2, threshold: 0.6795 },
106 { tag: "green on white", index: 2, threshold: 0.6795 },
107 { tag: "blue on darkgrey", index: 3, threshold: 0.3675 },
107 { tag: "blue on darkgrey", index: 3, threshold: 0.3675 },
@@ -130,7 +130,7 @@ Rectangle {
130
130
131 function test_dark_data() {
131 function test_dark_data() {
132 return [
132 return [
133− { tag: "default", index: 0, dark: "grey" },
133+ { tag: "default", index: 0, dark: Theme.palette.normal.baseText },
134 { tag: "red on black", index: 1, dark: "black" },
134 { tag: "red on black", index: 1, dark: "black" },
135 { tag: "green on white", index: 2, dark: "green" },
135 { tag: "green on white", index: 2, dark: "green" },
136 { tag: "blue on darkgrey", index: 3, dark: "blue" },
136 { tag: "blue on darkgrey", index: 3, dark: "blue" },
@@ -157,7 +157,7 @@ Rectangle {
157
157
158 function test_headerForeground_data() {
158 function test_headerForeground_data() {
159 return [
159 return [
160− { tag: "default", index: 0, headerForeground: "grey" },
160+ { tag: "default", index: 0, headerForeground: Theme.palette.normal.baseText },
161 { tag: "black", index: 2, headerForeground: "black" },
161 { tag: "black", index: 2, headerForeground: "black" },
162 ];
162 ];
163 }
163 }
tests/qmltests/Components/tst_LazyImage.qml+1−1
@@ -32,7 +32,7 @@ Rectangle {
32 rightMargin: 2 * parent.width / 3
32 rightMargin: 2 * parent.width / 3
33 }
33 }
34
34
35− color: "grey"
35+ color: Theme.palette.normal.baseText
36
36
37 Column {
37 Column {
38 anchors { fill: parent; margins: units.gu(5) }
38 anchors { fill: parent; margins: units.gu(5) }
tests/qmltests/Components/tst_PageHeader.qml+1−1
@@ -242,7 +242,7 @@ Item {
242 searchEntryEnabled: true
242 searchEntryEnabled: true
243 title: "%^$%^%^&%^&%^$%GHR%"
243 title: "%^$%^%^&%^&%^$%GHR%"
244 scopeStyle: QtObject {
244 scopeStyle: QtObject {
245− readonly property color foreground: "grey"
245+ readonly property color foreground: Theme.palette.normal.baseText
246 readonly property url headerLogo: showImageCheckBox.checked ? pageHeader.titleImageSource : ""
246 readonly property url headerLogo: showImageCheckBox.checked ? pageHeader.titleImageSource : ""
247 }
247 }
248 showBackButton: showBackButtonCheckBox.checked
248 showBackButton: showBackButtonCheckBox.checked
tests/qmltests/Dash/tst_Card.qml+1−1
@@ -452,7 +452,7 @@ Rectangle {
452
452
453 background.color = data.tag;
453 background.color = data.tag;
454
454
455− var fontColor = data.dark ? "grey" : "white";
455+ var fontColor = data.dark ? Theme.palette.normal.baseText : "white";
456
456
457 tryCompareFunction(function() { return Qt.colorEqual(summary.color, fontColor); }, true);
457 tryCompareFunction(function() { return Qt.colorEqual(summary.color, fontColor); }, true);
458 tryCompareFunction(function() { return Qt.colorEqual(title.color, fontColor); }, true);
458 tryCompareFunction(function() { return Qt.colorEqual(title.color, fontColor); }, true);
tests/qmltests/Dash/tst_GenericScopeView.qml+2−2
@@ -333,9 +333,9 @@ Item {
333
333
334 function test_header_style_data() {
334 function test_header_style_data() {
335 return [
335 return [
336− { tag: "Default", index: 0, foreground: "grey", background: "", logo: "" },
336+ { tag: "Default", index: 0, foreground: Theme.palette.normal.baseText, background: "", logo: "" },
337 { tag: "Foreground", index: 1, foreground: "yellow", background: "", logo: "" },
337 { 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",
339 logo: Qt.resolvedUrl("../Components/tst_PageHeader/logo-ubuntu-orange.svg") },
339 logo: Qt.resolvedUrl("../Components/tst_PageHeader/logo-ubuntu-orange.svg") },
340 ];
340 ];
341 }
341 }