Merge lp:~tpeeters/ubuntu-ui-toolkit/panelColor into lp:ubuntu-ui-toolkit/staging

Proposed by Tim Peeters
Status: Merged
Approved by: Zsombor Egri
Approved revision: 1320
Merged at revision: 1314
Proposed branch: lp:~tpeeters/ubuntu-ui-toolkit/panelColor
Merge into: lp:ubuntu-ui-toolkit/staging
Diff against target: 157 lines (+56/-7)
5 files modified
modules/Ubuntu/Components/AppHeader.qml (+5/-0)
modules/Ubuntu/Components/MainView.qml (+1/-0)
modules/Ubuntu/Components/Themes/Ambiance/BubbleShape.qml (+12/-5)
modules/Ubuntu/Components/Themes/Ambiance/PageHeadStyle.qml (+21/-0)
tests/resources/header/header.qml (+17/-2)
To merge this branch: bzr merge lp:~tpeeters/ubuntu-ui-toolkit/panelColor
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Approve
Zsombor Egri Approve
Review via email: mp+240455@code.launchpad.net

Commit message

Fix the panel colors for the tabs and actions overflow in the header.

To post a comment you must log in.
1317. By Tim Peeters

revert unrelated change

1318. By Tim Peeters

revert unrelated change

Revision history for this message
Zsombor Egri (zsombi) wrote :

Small comments inline.

review: Needs Information
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
1319. By Tim Peeters

REVIEW COMMENT: Remove deprecated properties

Revision history for this message
Tim Peeters (tpeeters) wrote :

The inline comments disappear when I push an update.

I removed the deprecated properties, but did not change the property square. I did not touch that property (only documented it), so if we want to change that we can do it in a separate MR.

Ready to be approved if you like it like this.

1320. By Tim Peeters

rename panelColor to panelBackgroundColor because more panel colors will be added later.

Revision history for this message
Tim Peeters (tpeeters) wrote :
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Zsombor Egri (zsombi) wrote :

Looks good. Thx!

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'modules/Ubuntu/Components/AppHeader.qml'
2--- modules/Ubuntu/Components/AppHeader.qml 2014-10-24 16:24:46 +0000
3+++ modules/Ubuntu/Components/AppHeader.qml 2014-11-03 20:32:09 +0000
4@@ -42,6 +42,11 @@
5 */
6 property color dividerColor
7
8+ /*!
9+ The background color of the panel. Value set by MainView.
10+ */
11+ property color panelColor
12+
13 Behavior on y {
14 enabled: animate && !(header.flickable && header.flickable.moving)
15 SmoothedAnimation {
16
17=== modified file 'modules/Ubuntu/Components/MainView.qml'
18--- modules/Ubuntu/Components/MainView.qml 2014-10-24 13:13:11 +0000
19+++ modules/Ubuntu/Components/MainView.qml 2014-11-03 20:32:09 +0000
20@@ -336,6 +336,7 @@
21 property real bottomY: headerItem.y + headerItem.height
22 animate: canvas.animate
23 dividerColor: Qt.darker(background.headerColor, 1.1)
24+ panelColor: Qt.lighter(background.headerColor, 1.1)
25
26 title: internal.activePage ? internal.activePage.title : ""
27 flickable: internal.activePage ? internal.activePage.flickable : null
28
29=== modified file 'modules/Ubuntu/Components/Themes/Ambiance/BubbleShape.qml'
30--- modules/Ubuntu/Components/Themes/Ambiance/BubbleShape.qml 2014-08-26 14:12:52 +0000
31+++ modules/Ubuntu/Components/Themes/Ambiance/BubbleShape.qml 2014-11-03 20:32:09 +0000
32@@ -1,5 +1,5 @@
33 /*
34- * Copyright 2013 Canonical Ltd.
35+ * Copyright 2013-2014 Canonical Ltd.
36 *
37 * This program is free software; you can redistribute it and/or modify
38 * it under the terms of the GNU Lesser General Public License as published by
39@@ -20,16 +20,23 @@
40 Item {
41 id: bubbleShape
42
43+ /*!
44+ Do not use an UbuntuShape but a Rectangle as the background of the BubbleShape.
45+ */
46+ property bool square: false
47+
48+ /*!
49+ The background color of the bubble.
50+ */
51+ property color color: square ? Theme.palette.normal.background : Theme.palette.normal.overlay
52+
53 property point target
54 property string direction: "down"
55 property bool clipContent: false
56 default property alias children: content.children
57- property alias bubbleColor: colorRect.color
58- property alias bubbleOpacity: colorRect.opacity
59 // FIXME: This should not be necessary. See
60 // https://bugs.launchpad.net/ubuntu-ui-toolkit/+bug/1214978
61 property alias arrowSource: arrow.source
62- property bool square: false
63
64 implicitWidth: units.gu(10)
65 implicitHeight: units.gu(8)
66@@ -128,7 +135,7 @@
67 Rectangle {
68 id: colorRect
69 anchors.fill: parent
70- color: square ? Theme.palette.normal.background : Theme.palette.normal.overlay
71+ color: bubbleShape.color
72 visible: bubbleShape.clipContent
73 }
74 }
75
76=== modified file 'modules/Ubuntu/Components/Themes/Ambiance/PageHeadStyle.qml'
77--- modules/Ubuntu/Components/Themes/Ambiance/PageHeadStyle.qml 2014-10-31 14:46:33 +0000
78+++ modules/Ubuntu/Components/Themes/Ambiance/PageHeadStyle.qml 2014-11-03 20:32:09 +0000
79@@ -33,6 +33,11 @@
80 textLeftMargin: units.gu(2)
81 maximumNumberOfActions: 3
82
83+ /*!
84+ The background color of the tabs panel and the actions overflow panel.
85+ */
86+ property color panelBackgroundColor: styledItem.panelColor
87+
88 implicitHeight: headerStyle.contentHeight + divider.height
89
90 // FIXME: Workaround to get sectionsRepeater.count in autopilot tests,
91@@ -313,6 +318,14 @@
92 callerMargin: -units.gu(1) + units.dp(4)
93 contentWidth: units.gu(20)
94
95+ Binding {
96+ target: tabsPopover.__foreground.__styleInstance
97+ property: "color"
98+ value: headerStyle.panelBackgroundColor
99+ when: tabsPopover.__foreground &&
100+ tabsPopover.__foreground.__styleInstance
101+ }
102+
103 Column {
104 anchors {
105 left: parent.left
106@@ -488,6 +501,14 @@
107 callerMargin: -units.gu(1) + units.dp(4)
108 contentWidth: units.gu(20)
109
110+ Binding {
111+ target: actionsOverflowPopover.__foreground.__styleInstance
112+ property: "color"
113+ value: headerStyle.panelBackgroundColor
114+ when: actionsOverflowPopover.__foreground &&
115+ actionsOverflowPopover.__foreground.__styleInstance
116+ }
117+
118 // Ensure the popover closes when actions change and
119 // the list item below may be destroyed before its
120 // onClicked is executed. See bug
121
122=== modified file 'tests/resources/header/header.qml'
123--- tests/resources/header/header.qml 2014-10-22 21:33:48 +0000
124+++ tests/resources/header/header.qml 2014-11-03 20:32:09 +0000
125@@ -19,8 +19,8 @@
126
127 MainView {
128 id: mainView
129- width: units.gu(40)
130- height: units.gu(50)
131+ width: units.gu(50)
132+ height: units.gu(70)
133 useDeprecatedToolbar: false
134
135 PageStack {
136@@ -32,6 +32,21 @@
137 Tab {
138 title: "Colors"
139 page: Page {
140+ head.actions: [
141+ Action {
142+ iconName: "close"
143+ text: "one"
144+ },
145+ Action {
146+ iconName: "close"
147+ text: "two"
148+ },
149+ Action {
150+ iconName: "close"
151+ text: "three"
152+ }
153+ ]
154+
155 Column {
156 height: childrenRect.height
157 width: parent.width - units.gu(8)

Subscribers

People subscribed via source and target branches