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

Proposed by Tim Peeters on 2016-01-06
Status: Merged
Approved by: Zsombor Egri on 2016-01-07
Approved revision: 1796
Merged at revision: 1796
Proposed branch: lp:~tpeeters/ubuntu-ui-toolkit/headerNoClip
Merge into: lp:ubuntu-ui-toolkit/staging
Diff against target: 90 lines (+18/-20)
4 files modified
src/Ubuntu/Components/1.3/AdaptivePageLayout.qml (+1/-0)
src/Ubuntu/Components/1.3/AppHeader.qml (+5/-0)
src/Ubuntu/Components/1.3/MainView.qml (+3/-20)
src/Ubuntu/Components/Themes/Ambiance/1.3/PageHeadStyle.qml (+9/-0)
To merge this branch: bzr merge lp:~tpeeters/ubuntu-ui-toolkit/headerNoClip
Reviewer Review Type Date Requested Status
Zsombor Egri 2016-01-06 Approve on 2016-01-07
Andrew Hayzen (community) functional Approve on 2016-01-06
PS Jenkins bot continuous-integration Approve on 2016-01-06
Review via email: mp+281738@code.launchpad.net

Commit message

Add background to AppHeader and remove contents clipping from MainView.

Description of the change

Note that with this change, the AppHeader no longer has a transparent background. So if the MainView had a gradient background, the gradient will not show through the header any more, but the header will have a solid background color equalling the color at the top of the MainView.

tests/resources/header/automaticColors.qml may be used to test this.

To post a comment you must log in.
Andrew Hayzen (ahayzen) wrote :

This resolves the issue that the music-app was having and the test case given :-)

review: Approve (functional)
Zsombor Egri (zsombi) wrote :

Red lines, red lines!!!! I like red lines!!!
Thanks for the change, it was really needed there!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/Ubuntu/Components/1.3/AdaptivePageLayout.qml'
2--- src/Ubuntu/Components/1.3/AdaptivePageLayout.qml 2015-10-29 10:03:14 +0000
3+++ src/Ubuntu/Components/1.3/AdaptivePageLayout.qml 2016-01-06 11:36:30 +0000
4@@ -777,6 +777,7 @@
5
6 property color dividerColor: layout.__propagated.header.dividerColor
7 property color panelColor: layout.__propagated.header.panelColor
8+ property color backgroundColor: layout.__propagated.header.backgroundColor
9
10 visible: !customHeader && holder.pageWrapper && holder.pageWrapper.active
11
12
13=== modified file 'src/Ubuntu/Components/1.3/AppHeader.qml'
14--- src/Ubuntu/Components/1.3/AppHeader.qml 2015-12-14 20:38:59 +0000
15+++ src/Ubuntu/Components/1.3/AppHeader.qml 2016-01-06 11:36:30 +0000
16@@ -32,6 +32,11 @@
17 }
18
19 /*!
20+ The background color of the header. Value set by MainView.
21+ */
22+ property color backgroundColor
23+
24+ /*!
25 The background color of the divider. Value set by MainView.
26 */
27 property color dividerColor
28
29=== modified file 'src/Ubuntu/Components/1.3/MainView.qml'
30--- src/Ubuntu/Components/1.3/MainView.qml 2015-10-13 13:37:43 +0000
31+++ src/Ubuntu/Components/1.3/MainView.qml 2016-01-06 11:36:30 +0000
32@@ -121,28 +121,10 @@
33 UbuntuApplication.inputMethod.keyboardRectangle.height : 0
34 }
35
36- // clip the contents so that it does not overlap the header
37 Item {
38- id: contentsClipper
39+ id: contents
40 anchors {
41- left: parent.left
42- right: parent.right
43- top: headerItem.bottom
44- bottom: parent.bottom
45- }
46- // only clip when necessary
47- // ListView headers may be positioned at the top, independent from
48- // flickable.contentY, so do not clip depending on activePage.flickable.contentY.
49- clip: headerItem.bottomY > 0 && internal.activePage && internal.activePage.flickable
50-
51- Item {
52- id: contents
53- anchors {
54- fill: parent
55-
56- // compensate so that the actual y is always 0
57- topMargin: -parent.y
58- }
59+ fill: parent
60 }
61 }
62
63@@ -159,6 +141,7 @@
64 property real bottomY: headerItem.y + headerItem.height
65 dividerColor: Qt.darker(mainView.headerColor, 1.1)
66 panelColor: Qt.lighter(mainView.headerColor, 1.1)
67+ backgroundColor: mainView.headerColor
68
69 title: internal.activePage ? internal.activePage.title : ""
70 pageStack: internal.activePage ? internal.activePage.pageStack : null
71
72=== modified file 'src/Ubuntu/Components/Themes/Ambiance/1.3/PageHeadStyle.qml'
73--- src/Ubuntu/Components/Themes/Ambiance/1.3/PageHeadStyle.qml 2015-12-08 22:05:42 +0000
74+++ src/Ubuntu/Components/Themes/Ambiance/1.3/PageHeadStyle.qml 2016-01-06 11:36:30 +0000
75@@ -44,6 +44,15 @@
76 */
77 property color titleColor: headerStyle.config.foregroundColor
78
79+ /*!
80+ The background color of the header.
81+ */
82+ property color backgroundColor: styledItem.backgroundColor
83+ Rectangle {
84+ anchors.fill: parent
85+ color: headerStyle.backgroundColor
86+ }
87+
88 // FIXME: When the three panel color properties below are removed,
89 // update unity8/Dash/PageHeader to use the new theming (currently
90 // in progress) to set these colors.

Subscribers

People subscribed via source and target branches