Merge lp:~mterry/unity8/less-ubuntucolors into lp:unity8

Proposed by Michael Terry
Status: Merged
Approved by: Michael Terry
Approved revision: 2332
Merged at revision: 2426
Proposed branch: lp:~mterry/unity8/less-ubuntucolors
Merge into: lp:unity8
Prerequisite: lp:~unity-team/unity8/uitkPageHeader
Diff against target: 211 lines (+17/-17)
15 files modified
plugins/Dash/AudioProgressBar.qml (+1/-1)
plugins/Dash/ScopeStyle.qml (+1/-1)
qml/Components/Dialogs.qml (+2/-2)
qml/Components/ModeSwitchWarningDialog.qml (+1/-1)
qml/Components/WindowControlButtons.qml (+1/-1)
qml/Dash/DashPageHeader.qml (+1/-1)
qml/Dash/Previews/PreviewActions.qml (+1/-1)
qml/Dash/Previews/PreviewPayments.qml (+1/-1)
qml/Launcher/LauncherDelegate.qml (+2/-2)
qml/Panel/Panel.qml (+1/-1)
qml/Stages/DecoratedWindow.qml (+1/-1)
qml/Stages/DesktopSpread.qml (+1/-1)
qml/Stages/DesktopSpreadDelegate.qml (+1/-1)
qml/Stages/SpreadDelegate.qml (+1/-1)
tests/plugins/Dash/tst_ScopeStyle.qml (+1/-1)
To merge this branch: bzr merge lp:~mterry/unity8/less-ubuntucolors
Reviewer Review Type Date Requested Status
Unity8 CI Bot continuous-integration Pending
Andrea Cimitan Pending
Review via email: mp+294969@code.launchpad.net

This proposal supersedes a proposal from 2016-05-16.

Commit message

Change some dash button colors from orange to green.

And switch other colors from hardcoded values to the same semantic theme value.

Description of the change

UbuntuColors should be avoided when possible. Instead we should use semantic color names from the theme. These are future-proof and potentially locale-proof (for locales where green and red mean different things -- which I heard was a thing, but can't find anything on it in a quick search).

Half this branch simply replaces some color names with the correct theme color. So no visual change there. But it also changes some colors:

plugins/Dash/AudioProgressBar.qml: progress bar color from orange to "activity" (blue)
plugins/Dash/ScopeStyle.qml: preview button color from orange to "positive" (green)
qml/Dash/DashPageHeader.qml: active filter color from orange to "positive" (green)
qml/Dash/Previews/PreviewActions.qml: button color from orange to "positive" (green)
qml/Dash/Previews/PreviewPayments.qml: purchase button color from orange to "positive" (green)

I didn't change any uses of the various "grey" colors (slate, jet, charcoal, etc). That seemed a bit more fiddly and less user visible. But they should in theory be fixed down the road.

 * Are there any related MPs required for this MP to build/function as expected? Please list.
 Just the pre-req (lp:~cimi/unity8/uitkPageHeader)

 * Did you perform an exploratory manual test run of your code change and any related functionality?
 Not yet.. will do in a bit

 * If you changed the packaging (debian), did you subscribe the ubuntu-unity team to this MP?
 NA

 * If you changed the UI, has there been a design review?
 No... Do we need one for just using the correct theme colors? The only border case I'd see is the purchase button -- maybe that's supposed to be branding-colored?

To post a comment you must log in.
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal

FAILED: Continuous integration, rev:2396
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/1203/
Executed test runs:
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=vivid+overlay,testname=qmluitests.sh/740
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/740
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/1612
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/1567
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/1567
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1560
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1560/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1560
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1560/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1560
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1560/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1560
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1560/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/1560
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/1560/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/1560
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/1560/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/1203/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Andrea Cimitan (cimi) wrote : Posted in a previous version of this proposal

Please rebase on https://code.launchpad.net/~cimi/unity8/uitkPageHeader/+merge/293608 since it will conflict in DashPageHeader.qml

review: Needs Fixing
Revision history for this message
Michael Terry (mterry) wrote : Posted in a previous version of this proposal

Done, rebased on uitkPageHeader. Thanks for the pointer.

Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal

PASSED: Continuous integration, rev:2397
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/1223/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=vivid+overlay,testname=qmluitests.sh/760
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/760
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/1640
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/1593
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/1593
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1586
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1586/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1586
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1586/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1586
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1586/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1586
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1586/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/1586
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/1586/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/1586
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/1586/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/1223/rebuild

review: Approve (continuous-integration)
Revision history for this message
Andrea Cimitan (cimi) wrote : Posted in a previous version of this proposal

 * Did you perform an exploratory manual test run of the code change and any related functionality?
y
 * Did CI run pass? If not, please explain why.
y

thank you, we'll see for the purchase button

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugins/Dash/AudioProgressBar.qml'
2--- plugins/Dash/AudioProgressBar.qml 2016-01-18 22:56:16 +0000
3+++ plugins/Dash/AudioProgressBar.qml 2016-05-17 20:47:52 +0000
4@@ -49,6 +49,6 @@
5 rightMargin: maxWidth - (maxWidth * root.progress)
6 }
7 height: units.dp(2)
8- backgroundColor: UbuntuColors.orange
9+ backgroundColor: theme.palette.normal.activity
10 }
11 }
12
13=== modified file 'plugins/Dash/ScopeStyle.qml'
14--- plugins/Dash/ScopeStyle.qml 2016-03-29 03:47:39 +0000
15+++ plugins/Dash/ScopeStyle.qml 2016-05-17 20:47:52 +0000
16@@ -70,7 +70,7 @@
17 readonly property url navigationBackground: "navigation-background" in d.headerStyle ? d.headerStyle["navigation-background"] : "color:///#f5f5f5"
18
19 /// Color of the primary preview button
20- readonly property color previewButtonColor: "preview-button-color" in style ? style["preview-button-color"] : UbuntuColors.orange
21+ readonly property color previewButtonColor: "preview-button-color" in style ? style["preview-button-color"] : theme.palette.normal.positive
22
23 //! @cond
24 property var d: QtObject {
25
26=== modified file 'qml/Components/Dialogs.qml'
27--- qml/Components/Dialogs.qml 2016-04-27 15:01:10 +0000
28+++ qml/Components/Dialogs.qml 2016-05-17 20:47:52 +0000
29@@ -185,7 +185,7 @@
30 unitySessionService.reboot();
31 rebootDialog.hide();
32 }
33- color: UbuntuColors.red
34+ color: theme.palette.normal.negative
35 }
36 }
37 }
38@@ -203,7 +203,7 @@
39 powerDialog.hide();
40 root.powerOffClicked();
41 }
42- color: UbuntuColors.red
43+ color: theme.palette.normal.negative
44 }
45 Button {
46 text: i18n.ctr("Button: Restart the system", "Restart")
47
48=== modified file 'qml/Components/ModeSwitchWarningDialog.qml'
49--- qml/Components/ModeSwitchWarningDialog.qml 2016-03-08 13:57:52 +0000
50+++ qml/Components/ModeSwitchWarningDialog.qml 2016-05-17 20:47:52 +0000
51@@ -86,7 +86,7 @@
52 Button {
53 objectName: "forceCloseButton"
54 text: i18n.tr("Close all")
55- color: UbuntuColors.red
56+ color: theme.palette.normal.negative
57 onClicked: {
58 root.forceClose();
59 }
60
61=== modified file 'qml/Components/WindowControlButtons.qml'
62--- qml/Components/WindowControlButtons.qml 2016-04-27 14:57:19 +0000
63+++ qml/Components/WindowControlButtons.qml 2016-05-17 20:47:52 +0000
64@@ -43,7 +43,7 @@
65 width: units.gu(2)
66 height: units.gu(2)
67 radius: height / 2
68- color: UbuntuColors.red
69+ color: theme.palette.normal.negative
70 visible: parent.containsMouse
71 }
72 Icon {
73
74=== modified file 'qml/Dash/DashPageHeader.qml'
75--- qml/Dash/DashPageHeader.qml 2016-05-17 20:47:52 +0000
76+++ qml/Dash/DashPageHeader.qml 2016-05-17 20:47:52 +0000
77@@ -269,7 +269,7 @@
78 anchors.fill: parent
79 anchors.margins: units.gu(2)
80 name: "filters"
81- color: root.activeFiltersCount > 0 ? UbuntuColors.orange : header.__styleInstance.foregroundColor
82+ color: root.activeFiltersCount > 0 ? theme.palette.normal.positive : header.__styleInstance.foregroundColor
83 }
84
85 onClicked: {
86
87=== modified file 'qml/Dash/Previews/PreviewActions.qml'
88--- qml/Dash/Previews/PreviewActions.qml 2016-04-01 13:20:27 +0000
89+++ qml/Dash/Previews/PreviewActions.qml 2016-05-17 20:47:52 +0000
90@@ -66,7 +66,7 @@
91 visible: root.actions && root.actions.length > 0
92 onTriggeredAction: root.triggered(root.widgetId, actionData.id, actionData)
93 width: (root.width - units.gu(1)) / 2
94- color: root.scopeStyle ? root.scopeStyle.previewButtonColor : UbuntuColors.orange
95+ color: root.scopeStyle ? root.scopeStyle.previewButtonColor : theme.palette.normal.positive
96 }
97 }
98 }
99
100=== modified file 'qml/Dash/Previews/PreviewPayments.qml'
101--- qml/Dash/Previews/PreviewPayments.qml 2016-02-16 20:00:47 +0000
102+++ qml/Dash/Previews/PreviewPayments.qml 2016-05-17 20:47:52 +0000
103@@ -35,7 +35,7 @@
104 id: paymentButton
105 objectName: "paymentButton"
106
107- color: UbuntuColors.orange
108+ color: theme.palette.normal.positive
109 text: paymentClient.formattedPrice
110 onClicked: {
111 paymentClient.start();
112
113=== modified file 'qml/Launcher/LauncherDelegate.qml'
114--- qml/Launcher/LauncherDelegate.qml 2016-03-29 13:51:56 +0000
115+++ qml/Launcher/LauncherDelegate.qml 2016-05-17 20:47:52 +0000
116@@ -164,7 +164,7 @@
117 }
118 width: Math.min(root.itemWidth, Math.max(units.gu(2), countLabel.implicitWidth + units.gu(1)))
119 height: units.gu(2)
120- backgroundColor: UbuntuColors.green
121+ backgroundColor: theme.palette.normal.positive
122 visible: root.countVisible
123 aspect: UbuntuShape.Flat
124
125@@ -207,7 +207,7 @@
126 top: parent.top
127 bottom: parent.bottom
128 }
129- backgroundColor: UbuntuColors.blue
130+ backgroundColor: theme.palette.normal.activity
131 borderSource: "none"
132 width: progressOverlay.width
133 }
134
135=== modified file 'qml/Panel/Panel.qml'
136--- qml/Panel/Panel.qml 2016-04-27 15:01:10 +0000
137+++ qml/Panel/Panel.qml 2016-05-17 20:47:52 +0000
138@@ -89,7 +89,7 @@
139
140 Rectangle {
141 id: indicatorAreaBackground
142- color: callHint.visible ? UbuntuColors.green : theme.palette.normal.background
143+ color: callHint.visible ? theme.palette.normal.positive : theme.palette.normal.background
144 anchors {
145 top: parent.top
146 left: parent.left
147
148=== modified file 'qml/Stages/DecoratedWindow.qml'
149--- qml/Stages/DecoratedWindow.qml 2016-04-27 15:01:10 +0000
150+++ qml/Stages/DecoratedWindow.qml 2016-05-17 20:47:52 +0000
151@@ -62,7 +62,7 @@
152 Rectangle {
153 anchors { left: selectionHighlight.left; right: selectionHighlight.right; bottom: selectionHighlight.bottom; }
154 height: units.dp(2)
155- color: UbuntuColors.orange
156+ color: theme.palette.normal.focus
157 visible: highlightShown
158 }
159
160
161=== modified file 'qml/Stages/DesktopSpread.qml'
162--- qml/Stages/DesktopSpread.qml 2016-04-27 11:55:12 +0000
163+++ qml/Stages/DesktopSpread.qml 2016-05-17 20:47:52 +0000
164@@ -494,7 +494,7 @@
165 // Rectangle {
166 // anchors { left: parent.left; right: parent.right; bottom: parent.bottom }
167 // height: units.dp(2)
168- // color: UbuntuColors.orange
169+ // color: theme.palette.normal.focus
170 // visible: index == 0 // TODO: should be active workspace index
171 // }
172 }
173
174=== modified file 'qml/Stages/DesktopSpreadDelegate.qml'
175--- qml/Stages/DesktopSpreadDelegate.qml 2016-04-04 13:37:49 +0000
176+++ qml/Stages/DesktopSpreadDelegate.qml 2016-05-17 20:47:52 +0000
177@@ -83,7 +83,7 @@
178 Rectangle {
179 anchors { left: selectionHighlight.left; right: selectionHighlight.right; bottom: selectionHighlight.bottom; }
180 height: units.dp(2)
181- color: UbuntuColors.orange
182+ color: theme.palette.normal.focus
183 visible: root.highlightShown
184 antialiasing: true
185 }
186
187=== modified file 'qml/Stages/SpreadDelegate.qml'
188--- qml/Stages/SpreadDelegate.qml 2016-04-27 15:01:10 +0000
189+++ qml/Stages/SpreadDelegate.qml 2016-05-17 20:47:52 +0000
190@@ -286,7 +286,7 @@
191 Rectangle {
192 anchors { left: selectionHighlight.left; right: selectionHighlight.right; bottom: selectionHighlight.bottom; }
193 height: units.dp(2)
194- color: UbuntuColors.orange
195+ color: theme.palette.normal.focus
196 visible: root.highlightShown
197 antialiasing: true
198 }
199
200=== modified file 'tests/plugins/Dash/tst_ScopeStyle.qml'
201--- tests/plugins/Dash/tst_ScopeStyle.qml 2016-03-29 03:47:39 +0000
202+++ tests/plugins/Dash/tst_ScopeStyle.qml 2016-05-17 20:47:52 +0000
203@@ -174,7 +174,7 @@
204
205 function test_previewButtonColor_data() {
206 return [
207- { tag: "default", index: 0, previewButtonColor: UbuntuColors.orange },
208+ { tag: "default", index: 0, previewButtonColor: theme.palette.normal.positive },
209 { tag: "red", index: 1, previewButtonColor: "red" },
210 ];
211 }

Subscribers

People subscribed via source and target branches