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

Proposed by Tim Peeters
Status: Merged
Approved by: Zsombor Egri
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 Approve
Andrew Hayzen (community) functional Approve
PS Jenkins bot continuous-integration Approve
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.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Andrew Hayzen (ahayzen) wrote :

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

review: Approve (functional)
Revision history for this message
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
=== modified file 'src/Ubuntu/Components/1.3/AdaptivePageLayout.qml'
--- src/Ubuntu/Components/1.3/AdaptivePageLayout.qml 2015-10-29 10:03:14 +0000
+++ src/Ubuntu/Components/1.3/AdaptivePageLayout.qml 2016-01-06 11:36:30 +0000
@@ -777,6 +777,7 @@
777777
778 property color dividerColor: layout.__propagated.header.dividerColor778 property color dividerColor: layout.__propagated.header.dividerColor
779 property color panelColor: layout.__propagated.header.panelColor779 property color panelColor: layout.__propagated.header.panelColor
780 property color backgroundColor: layout.__propagated.header.backgroundColor
780781
781 visible: !customHeader && holder.pageWrapper && holder.pageWrapper.active782 visible: !customHeader && holder.pageWrapper && holder.pageWrapper.active
782783
783784
=== modified file 'src/Ubuntu/Components/1.3/AppHeader.qml'
--- src/Ubuntu/Components/1.3/AppHeader.qml 2015-12-14 20:38:59 +0000
+++ src/Ubuntu/Components/1.3/AppHeader.qml 2016-01-06 11:36:30 +0000
@@ -32,6 +32,11 @@
32 }32 }
3333
34 /*!34 /*!
35 The background color of the header. Value set by MainView.
36 */
37 property color backgroundColor
38
39 /*!
35 The background color of the divider. Value set by MainView.40 The background color of the divider. Value set by MainView.
36 */41 */
37 property color dividerColor42 property color dividerColor
3843
=== modified file 'src/Ubuntu/Components/1.3/MainView.qml'
--- src/Ubuntu/Components/1.3/MainView.qml 2015-10-13 13:37:43 +0000
+++ src/Ubuntu/Components/1.3/MainView.qml 2016-01-06 11:36:30 +0000
@@ -121,28 +121,10 @@
121 UbuntuApplication.inputMethod.keyboardRectangle.height : 0121 UbuntuApplication.inputMethod.keyboardRectangle.height : 0
122 }122 }
123123
124 // clip the contents so that it does not overlap the header
125 Item {124 Item {
126 id: contentsClipper125 id: contents
127 anchors {126 anchors {
128 left: parent.left127 fill: parent
129 right: parent.right
130 top: headerItem.bottom
131 bottom: parent.bottom
132 }
133 // only clip when necessary
134 // ListView headers may be positioned at the top, independent from
135 // flickable.contentY, so do not clip depending on activePage.flickable.contentY.
136 clip: headerItem.bottomY > 0 && internal.activePage && internal.activePage.flickable
137
138 Item {
139 id: contents
140 anchors {
141 fill: parent
142
143 // compensate so that the actual y is always 0
144 topMargin: -parent.y
145 }
146 }128 }
147 }129 }
148130
@@ -159,6 +141,7 @@
159 property real bottomY: headerItem.y + headerItem.height141 property real bottomY: headerItem.y + headerItem.height
160 dividerColor: Qt.darker(mainView.headerColor, 1.1)142 dividerColor: Qt.darker(mainView.headerColor, 1.1)
161 panelColor: Qt.lighter(mainView.headerColor, 1.1)143 panelColor: Qt.lighter(mainView.headerColor, 1.1)
144 backgroundColor: mainView.headerColor
162145
163 title: internal.activePage ? internal.activePage.title : ""146 title: internal.activePage ? internal.activePage.title : ""
164 pageStack: internal.activePage ? internal.activePage.pageStack : null147 pageStack: internal.activePage ? internal.activePage.pageStack : null
165148
=== modified file 'src/Ubuntu/Components/Themes/Ambiance/1.3/PageHeadStyle.qml'
--- src/Ubuntu/Components/Themes/Ambiance/1.3/PageHeadStyle.qml 2015-12-08 22:05:42 +0000
+++ src/Ubuntu/Components/Themes/Ambiance/1.3/PageHeadStyle.qml 2016-01-06 11:36:30 +0000
@@ -44,6 +44,15 @@
44 */44 */
45 property color titleColor: headerStyle.config.foregroundColor45 property color titleColor: headerStyle.config.foregroundColor
4646
47 /*!
48 The background color of the header.
49 */
50 property color backgroundColor: styledItem.backgroundColor
51 Rectangle {
52 anchors.fill: parent
53 color: headerStyle.backgroundColor
54 }
55
47 // FIXME: When the three panel color properties below are removed,56 // FIXME: When the three panel color properties below are removed,
48 // update unity8/Dash/PageHeader to use the new theming (currently57 // update unity8/Dash/PageHeader to use the new theming (currently
49 // in progress) to set these colors.58 // in progress) to set these colors.

Subscribers

People subscribed via source and target branches