on xenial help sign in
Implement foreground-color customization (with TODO)
d392342Albert Astals
qml/Components/PageHeader.qml+5−1
@@ -37,6 +37,10 @@ Item {
37 property alias bottomItem: bottomContainer.children
37 property alias bottomItem: bottomContainer.children
38
38
39 property alias backgroundColor: headerBackground.color
39 property alias backgroundColor: headerBackground.color
40+ // TODO We should use foregroundColor for the icons
41+ // of the toolbar but unfortunately Action does not have
42+ // the keyColor property as Icon does :-/
43+ property color foregroundColor: "gray"
40
44
41 signal backClicked()
45 signal backClicked()
42
46
@@ -199,7 +203,7 @@ Item {
199 height: headerContainer.height
203 height: headerContainer.height
200 contentHeight: height
204 contentHeight: height
201 separatorSource: ""
205 separatorSource: ""
202− textColor: "grey"
206+ textColor: root.foregroundColor
203 property var styledItem: header
207 property var styledItem: header
204 property string title: root.title
208 property string title: root.title
205 property var config: PageHeadConfiguration {
209 property var config: PageHeadConfiguration {
qml/Dash/GenericScopeView.qml+1
@@ -320,6 +320,7 @@ FocusScope {
320 searchEntryEnabled: true
320 searchEntryEnabled: true
321 searchInProgress: root.scope.searchInProgress
321 searchInProgress: root.scope.searchInProgress
322 backgroundColor: scopeView.scope && scopeView.scope.customizations["background-color"] || "transparent"
322 backgroundColor: scopeView.scope && scopeView.scope.customizations["background-color"] || "transparent"
323+ foregroundColor: scopeView.scope && scopeView.scope.customizations["foreground-color"] || "grey"
323
324
324 bottomItem: DashDepartments {
325 bottomItem: DashDepartments {
325 scope: scopeView.scope
326 scope: scopeView.scope
tests/mocks/Unity/fake_scope.cpp+1
@@ -160,6 +160,7 @@ QVariantMap Scope::customizations() const
160 QVariantMap m;
160 QVariantMap m;
161 if (m_id == "clickscope") {
161 if (m_id == "clickscope") {
162 m["background-color"] = "red";
162 m["background-color"] = "red";
163+ m["foreground-color"] = "blue";
163 }
164 }
164 return m;
165 return m;
165}
166}