on xenial help sign in
Implement foreground-color customization (with TODO)
commitd392342317194a5442f5cb5e5a4b5e42273d4107 authorAlbert Astals <albert.astals@canonical.com> dateTue 1 Jul 2014, 15:58 (12 years ago) parent914adf4
3 files changed+7−1
qml/Components/PageHeader.qml+5−1 qml/Dash/GenericScopeView.qml+1 tests/mocks/Unity/fake_scope.cpp+1
qml/Components/PageHeader.qml+5−1
@@ -37,6 +37,10 @@ Item {
3737 property alias bottomItem: bottomContainer.children
3838
3939 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"
4044
4145 signal backClicked()
4246
@@ -199,7 +203,7 @@ Item {
199203 height: headerContainer.height
200204 contentHeight: height
201205 separatorSource: ""
202− textColor: "grey"
206+ textColor: root.foregroundColor
203207 property var styledItem: header
204208 property string title: root.title
205209 property var config: PageHeadConfiguration {
qml/Dash/GenericScopeView.qml+1
@@ -320,6 +320,7 @@ FocusScope {
320320 searchEntryEnabled: true
321321 searchInProgress: root.scope.searchInProgress
322322 backgroundColor: scopeView.scope && scopeView.scope.customizations["background-color"] || "transparent"
323+ foregroundColor: scopeView.scope && scopeView.scope.customizations["foreground-color"] || "grey"
323324
324325 bottomItem: DashDepartments {
325326 scope: scopeView.scope
tests/mocks/Unity/fake_scope.cpp+1
@@ -160,6 +160,7 @@ QVariantMap Scope::customizations() const
160160 QVariantMap m;
161161 if (m_id == "clickscope") {
162162 m["background-color"] = "red";
163+ m["foreground-color"] = "blue";
163164 }
164165 return m;
165166}