on xenial help sign in
PageHeader: set offscreen portion invisible, clip only when necessary
commita040523869167469ea3542bb486a51978871ca7b authorGerry Boland <gerry.boland@canonical.com> dateWed 16 Jul 2014, 17:21 (12 years ago) parent3bcda1f
1 file changed+3−1
qml/Components/PageHeader.qml+3−1
qml/Components/PageHeader.qml+3−1
@@ -117,7 +117,7 @@ Item {
117117 Flickable {
118118 id: headerContainer
119119 objectName: "headerContainer"
120− clip: true
120+ clip: contentY > 0 && contentY < height
121121 anchors { left: parent.left; top: parent.top; right: parent.right }
122122 height: units.gu(6.5)
123123 contentHeight: headersColumn.height
@@ -150,6 +150,7 @@ Item {
150150 anchors { left: parent.left; right: parent.right }
151151 height: headerContainer.height
152152 contentHeight: height
153+ opacity: headerContainer.contentY < height ? 1 : 0 // setting visible false cause column to relayout
153154 separatorSource: ""
154155 // Required to keep PageHeadStyle noise down as it expects the Page's properties around.
155156 property var styledItem: searchHeader
@@ -224,6 +225,7 @@ Item {
224225 anchors { left: parent.left; right: parent.right }
225226 height: headerContainer.height
226227 contentHeight: height
228+ opacity: headerContainer.contentY > 0 ? 1 : 0 // setting visible false cause column to relayout
227229 separatorSource: ""
228230 textColor: root.scopeStyle ? root.scopeStyle.foreground : "grey"
229231 property var styledItem: header