on xenial help sign in
Remove Flickable, use a simple Item
5600c95Andrea Cimitan
qml/Dash/DashPageHeader.qml+27−12
@@ -137,15 +137,11 @@ Item {
137 }
137 }
138 }
138 }
139
139
140− Flickable {
140+ Item {
141 id: headerContainer
141 id: headerContainer
142 objectName: "headerContainer"
142 objectName: "headerContainer"
143− clip: contentY < height
144 anchors { left: parent.left; top: parent.top; right: parent.right }
143 anchors { left: parent.left; top: parent.top; right: parent.right }
145 height: header.__styleInstance.contentHeight
144 height: header.__styleInstance.contentHeight
146− contentHeight: headersColumn.height
147− interactive: false
148− contentY: showSearch ? 0 : height
149
145
150 property bool showSearch: false
146 property bool showSearch: false
151
147
@@ -155,23 +151,42 @@ Item {
155 style: scopeStyle.headerBackground
151 style: scopeStyle.headerBackground
156 }
152 }
157
153
158− Behavior on contentY {
154+ Column {
159− UbuntuNumberAnimation {
155+ id: headersColumn
156+ anchors {
157+ left: parent.left
158+ right: parent.right
159+ bottom: parent.bottom
160+ }
161+
162+ state: headerContainer.showSearch ? "search" : ""
163+
164+ states: State {
165+ name: "search"
166+
167+ AnchorChanges {
168+ target: headersColumn
169+ anchors.top: parent.top
170+ anchors.bottom: undefined
171+ }
172+ }
173+
174+ transitions: Transition {
160 id: openSearchAnimation
175 id: openSearchAnimation
176+ AnchorAnimation {
177+ duration: UbuntuAnimation.FastDuration
178+ }
179+
161 property bool openPopup: false
180 property bool openPopup: false
162
181
163 onRunningChanged: {
182 onRunningChanged: {
183+ headerContainer.clip = running;
164 if (!running && openSearchAnimation.openPopup) {
184 if (!running && openSearchAnimation.openPopup) {
165 openSearchAnimation.openPopup = false;
185 openSearchAnimation.openPopup = false;
166 root.openPopup();
186 root.openPopup();
167 }
187 }
168 }
188 }
169 }
189 }
170− }
171−
172− Column {
173− id: headersColumn
174− anchors { left: parent.left; right: parent.right }
175
190
176 PageHeader {
191 PageHeader {
177 id: searchHeader
192 id: searchHeader