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

Proposed by Michael Terry
Status: Superseded
Proposed branch: lp:~mterry/unity8/less-ubuntucolors
Merge into: lp:unity8
Diff against target: 719 lines (+138/-143)
23 files modified
plugins/Dash/AudioProgressBar.qml (+1/-1)
plugins/Dash/ScopeStyle.qml (+1/-1)
qml/Components/Dialogs.qml (+2/-2)
qml/Components/Header.qml (+0/-28)
qml/Components/ModeSwitchWarningDialog.qml (+1/-1)
qml/Components/WindowControlButtons.qml (+1/-1)
qml/Dash/DashPageHeader.qml (+32/-37)
qml/Dash/GenericScopeView.qml (+5/-0)
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/Splash.qml (+7/-19)
qml/Stages/SpreadDelegate.qml (+1/-1)
tests/plugins/Dash/tst_ScopeStyle.qml (+1/-1)
tests/qmltests/Dash/tst_Dash.qml (+9/-9)
tests/qmltests/Dash/tst_DashContent.qml (+64/-5)
tests/qmltests/Dash/tst_DashPageHeader.qml (+0/-24)
tests/qmltests/Dash/tst_GenericScopeView.qml (+2/-2)
tests/qmltests/Dash/tst_PreviewView.qml (+3/-3)
To merge this branch: bzr merge lp:~mterry/unity8/less-ubuntucolors
Reviewer Review Type Date Requested Status
Andrea Cimitan (community) Needs Fixing
Unity8 CI Bot continuous-integration Needs Fixing
Review via email: mp+294514@code.launchpad.net

This proposal has been superseded by 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.
 No

 * 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 :

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 :

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

review: Needs Fixing
lp:~mterry/unity8/less-ubuntucolors updated
2331. By Michael Terry

Use PageHeader instead Ambiance's PageHeadStyle

2332. By Michael Terry

Fix some uses of UbuntuColors

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'plugins/Dash/AudioProgressBar.qml'
--- plugins/Dash/AudioProgressBar.qml 2016-01-18 22:56:16 +0000
+++ plugins/Dash/AudioProgressBar.qml 2016-05-16 14:05:53 +0000
@@ -49,6 +49,6 @@
49 rightMargin: maxWidth - (maxWidth * root.progress)49 rightMargin: maxWidth - (maxWidth * root.progress)
50 }50 }
51 height: units.dp(2)51 height: units.dp(2)
52 backgroundColor: UbuntuColors.orange52 backgroundColor: theme.palette.normal.activity
53 }53 }
54}54}
5555
=== modified file 'plugins/Dash/ScopeStyle.qml'
--- plugins/Dash/ScopeStyle.qml 2016-03-29 03:47:39 +0000
+++ plugins/Dash/ScopeStyle.qml 2016-05-16 14:05:53 +0000
@@ -70,7 +70,7 @@
70 readonly property url navigationBackground: "navigation-background" in d.headerStyle ? d.headerStyle["navigation-background"] : "color:///#f5f5f5"70 readonly property url navigationBackground: "navigation-background" in d.headerStyle ? d.headerStyle["navigation-background"] : "color:///#f5f5f5"
7171
72 /// Color of the primary preview button72 /// Color of the primary preview button
73 readonly property color previewButtonColor: "preview-button-color" in style ? style["preview-button-color"] : UbuntuColors.orange73 readonly property color previewButtonColor: "preview-button-color" in style ? style["preview-button-color"] : theme.palette.normal.positive
7474
75 //! @cond75 //! @cond
76 property var d: QtObject {76 property var d: QtObject {
7777
=== modified file 'qml/Components/Dialogs.qml'
--- qml/Components/Dialogs.qml 2016-04-27 15:01:10 +0000
+++ qml/Components/Dialogs.qml 2016-05-16 14:05:53 +0000
@@ -185,7 +185,7 @@
185 unitySessionService.reboot();185 unitySessionService.reboot();
186 rebootDialog.hide();186 rebootDialog.hide();
187 }187 }
188 color: UbuntuColors.red188 color: theme.palette.normal.negative
189 }189 }
190 }190 }
191 }191 }
@@ -203,7 +203,7 @@
203 powerDialog.hide();203 powerDialog.hide();
204 root.powerOffClicked();204 root.powerOffClicked();
205 }205 }
206 color: UbuntuColors.red206 color: theme.palette.normal.negative
207 }207 }
208 Button {208 Button {
209 text: i18n.ctr("Button: Restart the system", "Restart")209 text: i18n.ctr("Button: Restart the system", "Restart")
210210
=== removed file 'qml/Components/Header.qml'
--- qml/Components/Header.qml 2016-01-25 10:12:48 +0000
+++ qml/Components/Header.qml 1970-01-01 00:00:00 +0000
@@ -1,28 +0,0 @@
1/*
2 * Copyright (C) 2014 Canonical, Ltd.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; version 3.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17import Ubuntu.Components 1.3
18import Ubuntu.Components.Themes.Ambiance 1.3
19
20PageHeadStyle {
21 // FIXME: Don't use this but PageHeader from Ubuntu.Components 1.3.
22 id: root
23
24 property var styledItem: root
25 property string title
26 property var config: PageHeadConfiguration {}
27 property var contents: null
28}
290
=== modified file 'qml/Components/ModeSwitchWarningDialog.qml'
--- qml/Components/ModeSwitchWarningDialog.qml 2016-03-08 13:57:52 +0000
+++ qml/Components/ModeSwitchWarningDialog.qml 2016-05-16 14:05:53 +0000
@@ -86,7 +86,7 @@
86 Button {86 Button {
87 objectName: "forceCloseButton"87 objectName: "forceCloseButton"
88 text: i18n.tr("Close all")88 text: i18n.tr("Close all")
89 color: UbuntuColors.red89 color: theme.palette.normal.negative
90 onClicked: {90 onClicked: {
91 root.forceClose();91 root.forceClose();
92 }92 }
9393
=== modified file 'qml/Components/WindowControlButtons.qml'
--- qml/Components/WindowControlButtons.qml 2016-04-27 14:57:19 +0000
+++ qml/Components/WindowControlButtons.qml 2016-05-16 14:05:53 +0000
@@ -43,7 +43,7 @@
43 width: units.gu(2)43 width: units.gu(2)
44 height: units.gu(2)44 height: units.gu(2)
45 radius: height / 245 radius: height / 2
46 color: UbuntuColors.red46 color: theme.palette.normal.negative
47 visible: parent.containsMouse47 visible: parent.containsMouse
48 }48 }
49 Icon {49 Icon {
5050
=== modified file 'qml/Dash/DashPageHeader.qml'
--- qml/Dash/DashPageHeader.qml 2016-04-27 15:01:10 +0000
+++ qml/Dash/DashPageHeader.qml 2016-05-16 14:05:53 +0000
@@ -16,7 +16,7 @@
1616
17import QtQuick 2.417import QtQuick 2.4
18import Ubuntu.Components 1.318import Ubuntu.Components 1.3
19import Ubuntu.Components.Themes.Ambiance 1.319import Ubuntu.Components.Popups 1.3
20import Ubuntu.Components.ListItems 1.320import Ubuntu.Components.ListItems 1.3
21import "../Components"21import "../Components"
2222
@@ -78,13 +78,13 @@
78 }78 }
79 }79 }
8080
81 function closePopup(keepFocus) {81 function closePopup(keepFocus, keepSearch) {
82 if (extraPanel.visible) {82 if (extraPanel.visible) {
83 extraPanel.visible = false;83 extraPanel.visible = false;
84 } else if (!keepFocus) {84 } else if (!keepFocus) {
85 unfocus();85 unfocus(keepSearch);
86 }86 }
87 if (!searchTextField.text && !root.navigationTag && searchHistory.count == 0) {87 if (!keepSearch && !searchTextField.text && !root.navigationTag && searchHistory.count == 0) {
88 headerContainer.showSearch = false;88 headerContainer.showSearch = false;
89 }89 }
90 }90 }
@@ -97,9 +97,9 @@
97 closePopup(keepFocus);97 closePopup(keepFocus);
98 }98 }
9999
100 function unfocus() {100 function unfocus(keepSearch) {
101 searchTextField.focus = false;101 searchTextField.focus = false;
102 if (!searchTextField.text && !root.navigationTag) {102 if (!keepSearch && !searchTextField.text && !root.navigationTag) {
103 headerContainer.showSearch = false;103 headerContainer.showSearch = false;
104 }104 }
105 }105 }
@@ -142,7 +142,7 @@
142 objectName: "headerContainer"142 objectName: "headerContainer"
143 clip: contentY < height143 clip: contentY < height
144 anchors { left: parent.left; top: parent.top; right: parent.right }144 anchors { left: parent.left; top: parent.top; right: parent.right }
145 height: header.contentHeight145 height: header.__styleInstance.contentHeight
146 contentHeight: headersColumn.height146 contentHeight: headersColumn.height
147 interactive: false147 interactive: false
148 contentY: showSearch ? 0 : height148 contentY: showSearch ? 0 : height
@@ -173,22 +173,18 @@
173 id: headersColumn173 id: headersColumn
174 anchors { left: parent.left; right: parent.right }174 anchors { left: parent.left; right: parent.right }
175175
176 PageHeadStyle {176 PageHeader {
177 // FIXME: Replace PageHeadStyle from the Ambiance theme by the new PageHeader from Ubuntu.Components 1.3.
178 id: searchHeader177 id: searchHeader
179 anchors { left: parent.left; right: parent.right }178 anchors { left: parent.left; right: parent.right }
180 opacity: headerContainer.clip || headerContainer.showSearch ? 1 : 0 // setting visible false cause column to relayout179 opacity: headerContainer.clip || headerContainer.showSearch ? 1 : 0 // setting visible false cause column to relayout
181 __separator_visible: false180
182 // Required to keep PageHeadStyle noise down as it expects the Page's properties around.181 StyleHints {
183 property var styledItem: searchHeader
184 property color dividerColor: "transparent" // Doesn't matter as we don't have PageHeadSections
185 property color panelColor: background.topColor
186 panelForegroundColor: config.foregroundColor
187 backgroundColor: "transparent"
188 config: PageHeadConfiguration {
189 foregroundColor: root.scopeStyle ? root.scopeStyle.headerForeground : theme.palette.normal.baseText182 foregroundColor: root.scopeStyle ? root.scopeStyle.headerForeground : theme.palette.normal.baseText
183 backgroundColor: "transparent"
184 dividerColor: "transparent"
190 }185 }
191 property var contents: Item {186
187 contents: Item {
192 anchors.fill: parent188 anchors.fill: parent
193189
194 TextField {190 TextField {
@@ -273,7 +269,7 @@
273 anchors.fill: parent269 anchors.fill: parent
274 anchors.margins: units.gu(2)270 anchors.margins: units.gu(2)
275 name: "filters"271 name: "filters"
276 color: root.activeFiltersCount > 0 ? UbuntuColors.orange : header.config.foregroundColor272 color: root.activeFiltersCount > 0 ? theme.palette.normal.positive : header.__styleInstance.foregroundColor
277 }273 }
278274
279 onClicked: {275 onClicked: {
@@ -283,6 +279,7 @@
283279
284 AbstractButton {280 AbstractButton {
285 id: cancelButton281 id: cancelButton
282 objectName: "cancelButton"
286 width: cancelLabel.width + cancelLabel.anchors.rightMargin + cancelLabel.anchors.leftMargin283 width: cancelLabel.width + cancelLabel.anchors.rightMargin + cancelLabel.anchors.leftMargin
287 anchors {284 anchors {
288 top: parent.top285 top: parent.top
@@ -296,7 +293,7 @@
296 Label {293 Label {
297 id: cancelLabel294 id: cancelLabel
298 text: i18n.tr("Cancel")295 text: i18n.tr("Cancel")
299 color: header.panelForegroundColor296 color: header.__styleInstance.foregroundColor
300 verticalAlignment: Text.AlignVCenter297 verticalAlignment: Text.AlignVCenter
301 anchors {298 anchors {
302 verticalCenter: parent.verticalCenter299 verticalCenter: parent.verticalCenter
@@ -309,28 +306,27 @@
309 }306 }
310 }307 }
311308
312 PageHeadStyle {309 PageHeader {
313 // FIXME: Replace PageHeadStyle from the Ambiance theme by the new PageHeader from Ubuntu.Components 1.3.
314 id: header310 id: header
315 objectName: "innerPageHeader"311 objectName: "innerPageHeader"
316 anchors { left: parent.left; right: parent.right }312 anchors { left: parent.left; right: parent.right }
317 height: headerContainer.height313 height: headerContainer.height
318 opacity: headerContainer.clip || !headerContainer.showSearch ? 1 : 0 // setting visible false cause column to relayout314 opacity: headerContainer.clip || !headerContainer.showSearch ? 1 : 0 // setting visible false cause column to relayout
319 __separator_visible: false315 title: root.title
320 property var styledItem: header316
321 property color dividerColor: "transparent" // Doesn't matter as we don't have PageHeadSections317 StyleHints {
322 property color panelColor: background.topColor
323 panelForegroundColor: config.foregroundColor
324 backgroundColor: "transparent"
325 config: PageHeadConfiguration {
326 title: root.title
327 foregroundColor: root.scopeStyle ? root.scopeStyle.headerForeground : theme.palette.normal.baseText318 foregroundColor: root.scopeStyle ? root.scopeStyle.headerForeground : theme.palette.normal.baseText
328 backAction: Action {319 backgroundColor: "transparent"
329 iconName: backIsClose ? "close" : "back"320 dividerColor: "transparent"
330 visible: root.showBackButton321 }
331 onTriggered: root.backClicked()322
332 }323 leadingActionBar.actions: Action {
333324 iconName: backIsClose ? "close" : "back"
325 visible: root.showBackButton
326 onTriggered: root.backClicked()
327 }
328
329 trailingActionBar {
334 actions: [330 actions: [
335 Action {331 Action {
336 objectName: "store"332 objectName: "store"
@@ -366,7 +362,6 @@
366 ]362 ]
367 }363 }
368364
369 property var contents: null
370 Component.onCompleted: root.refreshLogo()365 Component.onCompleted: root.refreshLogo()
371366
372 Component {367 Component {
373368
=== modified file 'qml/Dash/GenericScopeView.qml'
--- qml/Dash/GenericScopeView.qml 2016-05-04 18:08:35 +0000
+++ qml/Dash/GenericScopeView.qml 2016-05-16 14:05:53 +0000
@@ -662,6 +662,10 @@
662 onShowFiltersPopup: { // item662 onShowFiltersPopup: { // item
663 extraPanel.visible = false;663 extraPanel.visible = false;
664 scopeView.filtersPopover = PopupUtils.open(Qt.resolvedUrl("FiltersPopover.qml"), item, { "contentWidth": scopeView.width - units.gu(2) } );664 scopeView.filtersPopover = PopupUtils.open(Qt.resolvedUrl("FiltersPopover.qml"), item, { "contentWidth": scopeView.width - units.gu(2) } );
665 scopeView.filtersPopover.Component.onDestruction.connect(function () {
666 categoryView.pageHeader.closePopup(false, true);
667 categoryView.pageHeader.unfocus(true); // remove the focus from the search field
668 })
665 }669 }
666 }670 }
667671
@@ -683,6 +687,7 @@
683 onHistoryItemClicked: {687 onHistoryItemClicked: {
684 SearchHistoryModel.addQuery(text);688 SearchHistoryModel.addQuery(text);
685 categoryView.pageHeader.searchQuery = text;689 categoryView.pageHeader.searchQuery = text;
690 categoryView.pageHeader.unfocus();
686 }691 }
687692
688 onDashNavigationLeafClicked: {693 onDashNavigationLeafClicked: {
689694
=== modified file 'qml/Dash/Previews/PreviewActions.qml'
--- qml/Dash/Previews/PreviewActions.qml 2016-04-01 13:20:27 +0000
+++ qml/Dash/Previews/PreviewActions.qml 2016-05-16 14:05:53 +0000
@@ -66,7 +66,7 @@
66 visible: root.actions && root.actions.length > 066 visible: root.actions && root.actions.length > 0
67 onTriggeredAction: root.triggered(root.widgetId, actionData.id, actionData)67 onTriggeredAction: root.triggered(root.widgetId, actionData.id, actionData)
68 width: (root.width - units.gu(1)) / 268 width: (root.width - units.gu(1)) / 2
69 color: root.scopeStyle ? root.scopeStyle.previewButtonColor : UbuntuColors.orange69 color: root.scopeStyle ? root.scopeStyle.previewButtonColor : theme.palette.normal.positive
70 }70 }
71 }71 }
72}72}
7373
=== modified file 'qml/Dash/Previews/PreviewPayments.qml'
--- qml/Dash/Previews/PreviewPayments.qml 2016-02-16 20:00:47 +0000
+++ qml/Dash/Previews/PreviewPayments.qml 2016-05-16 14:05:53 +0000
@@ -35,7 +35,7 @@
35 id: paymentButton35 id: paymentButton
36 objectName: "paymentButton"36 objectName: "paymentButton"
3737
38 color: UbuntuColors.orange38 color: theme.palette.normal.positive
39 text: paymentClient.formattedPrice39 text: paymentClient.formattedPrice
40 onClicked: {40 onClicked: {
41 paymentClient.start();41 paymentClient.start();
4242
=== modified file 'qml/Launcher/LauncherDelegate.qml'
--- qml/Launcher/LauncherDelegate.qml 2016-03-29 13:51:56 +0000
+++ qml/Launcher/LauncherDelegate.qml 2016-05-16 14:05:53 +0000
@@ -164,7 +164,7 @@
164 }164 }
165 width: Math.min(root.itemWidth, Math.max(units.gu(2), countLabel.implicitWidth + units.gu(1)))165 width: Math.min(root.itemWidth, Math.max(units.gu(2), countLabel.implicitWidth + units.gu(1)))
166 height: units.gu(2)166 height: units.gu(2)
167 backgroundColor: UbuntuColors.green167 backgroundColor: theme.palette.normal.positive
168 visible: root.countVisible168 visible: root.countVisible
169 aspect: UbuntuShape.Flat169 aspect: UbuntuShape.Flat
170170
@@ -207,7 +207,7 @@
207 top: parent.top207 top: parent.top
208 bottom: parent.bottom208 bottom: parent.bottom
209 }209 }
210 backgroundColor: UbuntuColors.blue210 backgroundColor: theme.palette.normal.activity
211 borderSource: "none"211 borderSource: "none"
212 width: progressOverlay.width212 width: progressOverlay.width
213 }213 }
214214
=== modified file 'qml/Panel/Panel.qml'
--- qml/Panel/Panel.qml 2016-04-27 15:01:10 +0000
+++ qml/Panel/Panel.qml 2016-05-16 14:05:53 +0000
@@ -89,7 +89,7 @@
8989
90 Rectangle {90 Rectangle {
91 id: indicatorAreaBackground91 id: indicatorAreaBackground
92 color: callHint.visible ? UbuntuColors.green : theme.palette.normal.background92 color: callHint.visible ? theme.palette.normal.positive : theme.palette.normal.background
93 anchors {93 anchors {
94 top: parent.top94 top: parent.top
95 left: parent.left95 left: parent.left
9696
=== modified file 'qml/Stages/DecoratedWindow.qml'
--- qml/Stages/DecoratedWindow.qml 2016-04-27 15:01:10 +0000
+++ qml/Stages/DecoratedWindow.qml 2016-05-16 14:05:53 +0000
@@ -62,7 +62,7 @@
62 Rectangle {62 Rectangle {
63 anchors { left: selectionHighlight.left; right: selectionHighlight.right; bottom: selectionHighlight.bottom; }63 anchors { left: selectionHighlight.left; right: selectionHighlight.right; bottom: selectionHighlight.bottom; }
64 height: units.dp(2)64 height: units.dp(2)
65 color: UbuntuColors.orange65 color: theme.palette.normal.focus
66 visible: highlightShown66 visible: highlightShown
67 }67 }
6868
6969
=== modified file 'qml/Stages/DesktopSpread.qml'
--- qml/Stages/DesktopSpread.qml 2016-04-27 11:55:12 +0000
+++ qml/Stages/DesktopSpread.qml 2016-05-16 14:05:53 +0000
@@ -494,7 +494,7 @@
494 // Rectangle {494 // Rectangle {
495 // anchors { left: parent.left; right: parent.right; bottom: parent.bottom }495 // anchors { left: parent.left; right: parent.right; bottom: parent.bottom }
496 // height: units.dp(2)496 // height: units.dp(2)
497 // color: UbuntuColors.orange497 // color: theme.palette.normal.focus
498 // visible: index == 0 // TODO: should be active workspace index498 // visible: index == 0 // TODO: should be active workspace index
499 // }499 // }
500 }500 }
501501
=== modified file 'qml/Stages/DesktopSpreadDelegate.qml'
--- qml/Stages/DesktopSpreadDelegate.qml 2016-04-04 13:37:49 +0000
+++ qml/Stages/DesktopSpreadDelegate.qml 2016-05-16 14:05:53 +0000
@@ -83,7 +83,7 @@
83 Rectangle {83 Rectangle {
84 anchors { left: selectionHighlight.left; right: selectionHighlight.right; bottom: selectionHighlight.bottom; }84 anchors { left: selectionHighlight.left; right: selectionHighlight.right; bottom: selectionHighlight.bottom; }
85 height: units.dp(2)85 height: units.dp(2)
86 color: UbuntuColors.orange86 color: theme.palette.normal.focus
87 visible: root.highlightShown87 visible: root.highlightShown
88 antialiasing: true88 antialiasing: true
89 }89 }
9090
=== modified file 'qml/Stages/Splash.qml'
--- qml/Stages/Splash.qml 2016-03-08 20:59:22 +0000
+++ qml/Stages/Splash.qml 2016-05-16 14:05:53 +0000
@@ -29,7 +29,7 @@
29 property color footerColor: d.undefinedColor29 property color footerColor: d.undefinedColor
30 property alias imageSource: overlaidImage.source30 property alias imageSource: overlaidImage.source
31 property url icon31 property url icon
32 property alias title: headerConfig.title32 property alias title: header.title
33 property alias showHeader: header.visible33 property alias showHeader: header.visible
3434
35 Ambiance.Palette {35 Ambiance.Palette {
@@ -75,25 +75,13 @@
75 style: Component { MainViewStyle {theme: styledItem.fakeTheme} }75 style: Component { MainViewStyle {theme: styledItem.fakeTheme} }
76 }76 }
7777
78 Ambiance.PageHeadStyle {78 PageHeader {
79 // FIXME: Replace PageHeadStyle by PageHeader from Ubuntu.Components 1.3.
80 id: header79 id: header
81 anchors {80 anchors { left: parent.left; right: parent.right }
82 left: parent.left;81 StyleHints {
83 right: parent.right82 foregroundColor: styledItem.fakeTheme.palette.selected.backgroundText
84 }83 backgroundColor: "transparent"
85 property var styledItem: header84 }
86 // FIXME Keep in sync with SDK's MainView.qml values of these two colors
87 property color dividerColor: Qt.darker(styledItem.backgroundColor, 1.1)
88 property color panelColor: Qt.lighter(styledItem.backgroundColor, 1.1)
89 panelForegroundColor: config.foregroundColor
90 backgroundColor: "transparent"
91 config: PageHeadConfiguration {
92 id: headerConfig
93 foregroundColor: styledItem.fakeTheme.palette.normal.backgroundText
94 }
95
96 property var contents: null
97 }85 }
9886
99 Image {87 Image {
10088
=== modified file 'qml/Stages/SpreadDelegate.qml'
--- qml/Stages/SpreadDelegate.qml 2016-04-27 15:01:10 +0000
+++ qml/Stages/SpreadDelegate.qml 2016-05-16 14:05:53 +0000
@@ -286,7 +286,7 @@
286 Rectangle {286 Rectangle {
287 anchors { left: selectionHighlight.left; right: selectionHighlight.right; bottom: selectionHighlight.bottom; }287 anchors { left: selectionHighlight.left; right: selectionHighlight.right; bottom: selectionHighlight.bottom; }
288 height: units.dp(2)288 height: units.dp(2)
289 color: UbuntuColors.orange289 color: theme.palette.normal.focus
290 visible: root.highlightShown290 visible: root.highlightShown
291 antialiasing: true291 antialiasing: true
292 }292 }
293293
=== modified file 'tests/plugins/Dash/tst_ScopeStyle.qml'
--- tests/plugins/Dash/tst_ScopeStyle.qml 2016-03-29 03:47:39 +0000
+++ tests/plugins/Dash/tst_ScopeStyle.qml 2016-05-16 14:05:53 +0000
@@ -174,7 +174,7 @@
174174
175 function test_previewButtonColor_data() {175 function test_previewButtonColor_data() {
176 return [176 return [
177 { tag: "default", index: 0, previewButtonColor: UbuntuColors.orange },177 { tag: "default", index: 0, previewButtonColor: theme.palette.normal.positive },
178 { tag: "red", index: 1, previewButtonColor: "red" },178 { tag: "red", index: 1, previewButtonColor: "red" },
179 ];179 ];
180 }180 }
181181
=== modified file 'tests/qmltests/Dash/tst_Dash.qml'
--- tests/qmltests/Dash/tst_Dash.qml 2016-02-15 10:14:43 +0000
+++ tests/qmltests/Dash/tst_Dash.qml 2016-05-16 14:05:53 +0000
@@ -125,7 +125,7 @@
125 // Go back125 // Go back
126 var scopesList = findChild(dash, "scopesList");126 var scopesList = findChild(dash, "scopesList");
127 var scopesListPageHeader = findChild(scopesList, "pageHeader");127 var scopesListPageHeader = findChild(scopesList, "pageHeader");
128 var backButton = findChild(findChild(scopesListPageHeader, "innerPageHeader"), "customBackButton");128 var backButton = findChild(scopesListPageHeader, "innerPageHeader").leadingActionBar;
129 mouseClick(backButton);129 mouseClick(backButton);
130 tryCompare(bottomEdgeController, "progress", 0);130 tryCompare(bottomEdgeController, "progress", 0);
131 }131 }
@@ -200,7 +200,7 @@
200200
201 // Go back201 // Go back
202 var dashTempScopeItemHeader = findChild(dashTempScopeItem, "scopePageHeader");202 var dashTempScopeItemHeader = findChild(dashTempScopeItem, "scopePageHeader");
203 var backButton = findChild(findChild(dashTempScopeItemHeader, "innerPageHeader"), "customBackButton");203 var backButton = findChild(dashTempScopeItemHeader, "innerPageHeader").leadingActionBar;
204 mouseClick(backButton);204 mouseClick(backButton);
205205
206 // Check temp scope is gone206 // Check temp scope is gone
@@ -253,7 +253,7 @@
253253
254 // Go back254 // Go back
255 var dashTempScopeItemHeader = findChild(dashTempScopeItem, "scopePageHeader");255 var dashTempScopeItemHeader = findChild(dashTempScopeItem, "scopePageHeader");
256 var backButton = findChild(findChild(dashTempScopeItemHeader, "innerPageHeader"), "customBackButton");256 var backButton = findChild(dashTempScopeItemHeader, "innerPageHeader").leadingActionBar;
257 mouseClick(backButton);257 mouseClick(backButton);
258258
259 // Check temp scope is gone259 // Check temp scope is gone
@@ -279,7 +279,7 @@
279 // Go back279 // Go back
280 var scopesList = findChild(dash, "scopesList");280 var scopesList = findChild(dash, "scopesList");
281 var scopesListPageHeader = findChild(scopesList, "pageHeader");281 var scopesListPageHeader = findChild(scopesList, "pageHeader");
282 var backButton = findChild(findChild(scopesListPageHeader, "innerPageHeader"), "customBackButton");282 var backButton = findChild(scopesListPageHeader, "innerPageHeader").leadingActionBar;
283 mouseClick(backButton);283 mouseClick(backButton);
284 tryCompare(bottomEdgeController, "progress", 0);284 tryCompare(bottomEdgeController, "progress", 0);
285 }285 }
@@ -391,7 +391,7 @@
391 // Exit edit mode and go back391 // Exit edit mode and go back
392 var scopesList = findChild(dash, "scopesList");392 var scopesList = findChild(dash, "scopesList");
393 var scopesListPageHeader = findChild(scopesList, "pageHeader");393 var scopesListPageHeader = findChild(scopesList, "pageHeader");
394 var backButton = findChild(findChild(scopesListPageHeader, "innerPageHeader"), "customBackButton");394 var backButton = findChild(scopesListPageHeader, "innerPageHeader").leadingActionBar;
395 mouseClick(backButton);395 mouseClick(backButton);
396 mouseClick(backButton);396 mouseClick(backButton);
397 tryCompare(bottomEdgeController, "progress", 0);397 tryCompare(bottomEdgeController, "progress", 0);
@@ -436,7 +436,7 @@
436 // Exit edit mode436 // Exit edit mode
437 var scopesList = findChild(dash, "scopesList");437 var scopesList = findChild(dash, "scopesList");
438 var scopesListPageHeader = findChild(scopesList, "pageHeader");438 var scopesListPageHeader = findChild(scopesList, "pageHeader");
439 var backButton = findChild(findChild(scopesListPageHeader, "innerPageHeader"), "customBackButton");439 var backButton = findChild(scopesListPageHeader, "innerPageHeader").leadingActionBar;
440 mouseClick(backButton);440 mouseClick(backButton);
441441
442 // Click on third scope442 // Click on third scope
@@ -546,7 +546,7 @@
546546
547 // Go back547 // Go back
548 var dashTempScopeItemHeader = findChild(dashTempScopeItem, "scopePageHeader");548 var dashTempScopeItemHeader = findChild(dashTempScopeItem, "scopePageHeader");
549 var backButton = findChild(findChild(dashTempScopeItemHeader, "innerPageHeader"), "customBackButton");549 var backButton = findChild(dashTempScopeItemHeader, "innerPageHeader").leadingActionBar;
550 mouseClick(backButton);550 mouseClick(backButton);
551551
552 // Check temp scope is gone552 // Check temp scope is gone
@@ -614,7 +614,7 @@
614614
615 // Go back615 // Go back
616 var dashTempScopeItemHeader = findChild(dashTempScopeItem, "scopePageHeader");616 var dashTempScopeItemHeader = findChild(dashTempScopeItem, "scopePageHeader");
617 var backButton = findChild(findChild(dashTempScopeItemHeader, "innerPageHeader"), "customBackButton");617 var backButton = findChild(dashTempScopeItemHeader, "innerPageHeader").leadingActionBar;
618 mouseClick(backButton);618 mouseClick(backButton);
619619
620 // Check temp scope is gone620 // Check temp scope is gone
@@ -646,7 +646,7 @@
646646
647 // Go back647 // Go back
648 var dashTempScopeItemHeader = findChild(dashTempScopeItem, "scopePageHeader");648 var dashTempScopeItemHeader = findChild(dashTempScopeItem, "scopePageHeader");
649 var backButton = findChild(findChild(dashTempScopeItemHeader, "innerPageHeader"), "customBackButton");649 var backButton = findChild(dashTempScopeItemHeader, "innerPageHeader").leadingActionBar;
650 mouseClick(backButton);650 mouseClick(backButton);
651651
652 // Check temp scope is gone652 // Check temp scope is gone
653653
=== modified file 'tests/qmltests/Dash/tst_DashContent.qml'
--- tests/qmltests/Dash/tst_DashContent.qml 2016-03-29 03:47:39 +0000
+++ tests/qmltests/Dash/tst_DashContent.qml 2016-05-16 14:05:53 +0000
@@ -215,7 +215,7 @@
215 verify(pageHeader, "Could not find the scope page header.");215 verify(pageHeader, "Could not find the scope page header.");
216 var innerHeader = findChild(pageHeader, "innerPageHeader");216 var innerHeader = findChild(pageHeader, "innerPageHeader");
217 verify(innerHeader, "Could not find the scope page header.");217 verify(innerHeader, "Could not find the scope page header.");
218 compare(innerHeader.config.title, scopesModel.getScope(data.index).name);218 compare(innerHeader.title, scopesModel.getScope(data.index).name);
219 }219 }
220220
221 function test_is_active_data() {221 function test_is_active_data() {
@@ -515,10 +515,18 @@
515 }515 }
516516
517 function test_navigationShowFilterPopup() {517 function test_navigationShowFilterPopup() {
518 goToSecondLevel();
519
520 var dashContentList = findChild(dashContent, "dashContentList");518 var dashContentList = findChild(dashContent, "dashContentList");
519 var pageHeader = findChild(dashContentList.currentItem, "scopePageHeader")
521 var settingsButton = findChild(dashContentList.currentItem, "settingsButton");520 var settingsButton = findChild(dashContentList.currentItem, "settingsButton");
521 var searchButton = findChild(dashContentList.currentItem, "search_button");
522 var cancelButton = findChild(dashContentList.currentItem, "cancelButton");
523 var searchTextField = findChild(pageHeader, "searchTextField");
524 var peExtraPanel = findChild(dashContentList.currentItem, "peExtraPanel");
525 var headerContainer = findChild(pageHeader, "headerContainer");
526
527 // test that closing the filters popover without a search unfocuses and removes the navigation
528 mouseClick(searchButton);
529 tryCompare(peExtraPanel, "visible", true);
522530
523 var filtersPopover = findChild(shell, "filtersPopover")531 var filtersPopover = findChild(shell, "filtersPopover")
524 verify(!filtersPopover);532 verify(!filtersPopover);
@@ -526,8 +534,33 @@
526 mouseClick(settingsButton);534 mouseClick(settingsButton);
527535
528 filtersPopover = findChild(shell, "filtersPopover")536 filtersPopover = findChild(shell, "filtersPopover")
529537 verify(filtersPopover);
530 verify(filtersPopover);538
539 mouseClick(shell, shell.width - 1, shell.height - 1);
540
541 tryCompare(pageHeader.extraPanel, "visible", false);
542 tryCompare(headerContainer, "showSearch", true);
543 tryCompare(searchTextField, "focus", false);
544
545 mouseClick(cancelButton);
546 tryCompare(headerContainer, "showSearch", false);
547 tryCompare(headerContainer, "contentY", headerContainer.height);
548
549 // test within a navigation
550 goToSecondLevel();
551
552 filtersPopover = findChild(shell, "filtersPopover")
553 verify(!filtersPopover);
554
555 mouseClick(settingsButton);
556
557 filtersPopover = findChild(shell, "filtersPopover")
558 verify(filtersPopover);
559
560 mouseClick(shell, shell.width - 1, shell.height - 1);
561
562 tryCompare(pageHeader.extraPanel, "visible", false);
563 tryCompare(headerContainer, "showSearch", true);
531 }564 }
532565
533 function test_primaryFilter() {566 function test_primaryFilter() {
@@ -625,5 +658,31 @@
625 tryCompareFunction(function() { return dashContentList.currentItem.item.scope.id == nextScopeId; }, true);658 tryCompareFunction(function() { return dashContentList.currentItem.item.scope.id == nextScopeId; }, true);
626 compare(dashContentList.currentIndex, 0);659 compare(dashContentList.currentIndex, 0);
627 }660 }
661
662 function test_extraPanel() {
663 var dashContentList = findChild(dashContent, "dashContentList");
664 var pageHeader = findChild(dashContentList.currentItem, "scopePageHeader")
665 pageHeader.searchEntryEnabled = true;
666 pageHeader.searchHistory.clear();
667
668 pageHeader.searchHistory.addQuery("Search1");
669 pageHeader.searchHistory.addQuery("Search2");
670
671 pageHeader.triggerSearch();
672 tryCompare(pageHeader.extraPanel, "visible", true);
673
674 var searchTextField = findChild(pageHeader, "searchTextField");
675 compare(searchTextField.focus, true);
676
677 var recentSearches = findChild(pageHeader.extraPanel, "recentSearchesRepeater");
678 verify(recentSearches, "Could not find recent searches");
679
680 waitForRendering(recentSearches);
681
682 mouseClick(recentSearches.itemAt(0));
683 compare(pageHeader.searchQuery, "Search2");
684 tryCompare(pageHeader.extraPanel, "visible", false);
685 compare(searchTextField.focus, false);
686 }
628 }687 }
629}688}
630689
=== modified file 'tests/qmltests/Dash/tst_DashPageHeader.qml'
--- tests/qmltests/Dash/tst_DashPageHeader.qml 2016-03-29 03:47:39 +0000
+++ tests/qmltests/Dash/tst_DashPageHeader.qml 2016-05-16 14:05:53 +0000
@@ -147,30 +147,6 @@
147 doResetSearch();147 doResetSearch();
148 }148 }
149149
150 function test_extraPanel() {
151 searchEnabled = true;
152 pageHeader.searchHistory.clear();
153
154 pageHeader.searchHistory.addQuery("Search1");
155 pageHeader.searchHistory.addQuery("Search2");
156
157 pageHeader.triggerSearch();
158
159 tryCompare(pageHeader.extraPanel, "visible", true);
160
161 var searchTextField = findChild(pageHeader, "searchTextField");
162 compare(searchTextField.focus, true);
163
164 var recentSearches = findChild(pageHeader.extraPanel, "recentSearchesRepeater");
165 verify(recentSearches, "Could not find recent searches");
166 waitForRendering(recentSearches);
167 mouseClick(recentSearches.itemAt(0));
168
169 compare(pageHeader.searchQuery, "Search2");
170 tryCompare(pageHeader.extraPanel, "visible", false);
171 compare(searchTextField.focus, false);
172 }
173
174 function test_popup_closing_data() {150 function test_popup_closing_data() {
175 return [151 return [
176 { tag: "with search text", searchText: "foobar", hideSearch: false },152 { tag: "with search text", searchText: "foobar", hideSearch: false },
177153
=== modified file 'tests/qmltests/Dash/tst_GenericScopeView.qml'
--- tests/qmltests/Dash/tst_GenericScopeView.qml 2016-03-29 03:47:39 +0000
+++ tests/qmltests/Dash/tst_GenericScopeView.qml 2016-05-16 14:05:53 +0000
@@ -442,8 +442,8 @@
442442
443 var innerHeader = findChild(header, "innerPageHeader");443 var innerHeader = findChild(header, "innerPageHeader");
444 verify(innerHeader, "Could not find the inner header");444 verify(innerHeader, "Could not find the inner header");
445 verify(Qt.colorEqual(innerHeader.config.foregroundColor, data.foreground),445 verify(Qt.colorEqual(innerHeader.__styleInstance.foregroundColor, data.foreground),
446 "Foreground color not equal: %1 != %2".arg(innerHeader.config.foregroundColor).arg(data.foreground));446 "Foreground color not equal: %1 != %2".arg(innerHeader.__styleInstance.foregroundColor).arg(data.foreground));
447447
448 var background = findChild(header, "headerBackground");448 var background = findChild(header, "headerBackground");
449 verify(background, "Could not find the background");449 verify(background, "Could not find the background");
450450
=== modified file 'tests/qmltests/Dash/tst_PreviewView.qml'
--- tests/qmltests/Dash/tst_PreviewView.qml 2016-03-29 03:47:39 +0000
+++ tests/qmltests/Dash/tst_PreviewView.qml 2016-05-16 14:05:53 +0000
@@ -98,7 +98,7 @@
98 var header = findChild(view, "innerPageHeader");98 var header = findChild(view, "innerPageHeader");
99 verify(header, "Could not find the preview header");99 verify(header, "Could not find the preview header");
100100
101 compare(header.config.title, "Mock Scope");101 compare(header.title, "Mock Scope");
102 }102 }
103103
104 function test_header_style() {104 function test_header_style() {
@@ -107,8 +107,8 @@
107107
108 var innerHeader = findChild(header, "innerPageHeader");108 var innerHeader = findChild(header, "innerPageHeader");
109 verify(innerHeader, "Could not find the inner header");109 verify(innerHeader, "Could not find the inner header");
110 verify(Qt.colorEqual(innerHeader.config.foregroundColor, UbuntuColors.darkGrey),110 verify(Qt.colorEqual(innerHeader.__styleInstance.foregroundColor, UbuntuColors.darkGrey),
111 "Foreground color not equal: %1 != %2".arg(innerHeader.config.foregroundColor).arg(UbuntuColors.darkGrey));111 "Foreground color not equal: %1 != %2".arg(innerHeader.__styleInstance.foregroundColor).arg(UbuntuColors.darkGrey));
112112
113 var background = findChild(header, "headerBackground");113 var background = findChild(header, "headerBackground");
114 verify(background, "Could not find the background");114 verify(background, "Could not find the background");

Subscribers

People subscribed via source and target branches