@@ -121,20 +121,22 @@ Item {
121 right: parent.right
121 right: parent.right
123 source: customTitle ? "" : "Pages/data/Phone header bkg.png"
123 source: customTitle ? "" : "Pages/data/Phone header bkg.png"
124− height: customTitle ? customMargin + titleLabel.height + customMargin : units.gu(16)
124+ height: units.gu(16)
125 clip: true
125 clip: true
127 // page title
127 // page title
129 id: titleLabel
129 id: titleLabel
130 property real animatedMargin: 0
130 property real animatedMargin: 0
131+ property real animatedTopMargin: titleRect.height - customMargin - titleLabel.height
131 anchors {
132 anchors {
132 left: parent.left
133 left: parent.left
133 right: parent.right
134 right: parent.right
134− bottom: parent.bottom
135+ top: parent.top
135 bottomMargin: bottomMargin
136 bottomMargin: bottomMargin
136 leftMargin: leftMargin + titleLabel.animatedMargin
137 leftMargin: leftMargin + titleLabel.animatedMargin
137 rightMargin: rightMargin
138 rightMargin: rightMargin
139+ topMargin: titleLabel.animatedTopMargin
139 text: title
141 text: title
140 color: customTitle ? textColor : backgroundColor
142 color: customTitle ? textColor : backgroundColor
@@ -196,13 +198,15 @@ Item {
197 id: contentHolder
199 id: contentHolder
198 property real animatedMargin: 0
200 property real animatedMargin: 0
201+ property real animatedTopMargin: 0
199 anchors {
202 anchors {
200 top: titleRect.bottom
203 top: titleRect.bottom
201 left: parent.left
204 left: parent.left
202 right: parent.right
205 right: parent.right
203 bottom: buttonBarVisible ? buttonRect.top : parent.top
206 bottom: buttonBarVisible ? buttonRect.top : parent.top
204− leftMargin: contentHolder.animatedMargin
207+ leftMargin: content.animatedMargin
205− rightMargin: -contentHolder.animatedMargin
208+ rightMargin: -content.animatedMargin
209+ topMargin: content.animatedTopMargin
207 visible: opacity > 0
211 visible: opacity > 0
@@ -258,6 +262,11 @@ Item {
258 startControlsAnimation(duration)
262 startControlsAnimation(duration)
265+ function aboutToShowSecondary(duration) {
266+ secondaryAnimation.restart()
267+ startControlsAnimation(duration)
261 function startContentAnimation(duration, direction) {
270 function startContentAnimation(duration, direction) {
262 contentAnimation.animationDurationBase = duration
271 contentAnimation.animationDurationBase = duration
263 contentAnimation.direction = direction
272 contentAnimation.direction = direction
@@ -294,10 +303,10 @@ Item {
294 ScriptAction { // direction of the effect
303 ScriptAction { // direction of the effect
295 script: {
304 script: {
296 if (contentAnimation.direction === Qt.LeftToRight) {
305 if (contentAnimation.direction === Qt.LeftToRight) {
297− titleLabel.animatedMargin = -titleRect.width;
306+ titleLabel.animatedMargin = -content.width;
298 content.animatedMargin = -content.width;
307 content.animatedMargin = -content.width;
300− titleLabel.animatedMargin = titleRect.width;
309+ titleLabel.animatedMargin = content.width;
301 content.animatedMargin = content.width;
310 content.animatedMargin = content.width;
@@ -319,4 +328,32 @@ Item {
332+ ParallelAnimation { // animation for the secondary pages
333+ id: secondaryAnimation
335+ NumberAnimation { // the slide-up animation
337+ property: 'animatedTopMargin'
338+ from: content.height
339+ to: titleRect.height - customMargin - titleLabel.height
340+ duration: UbuntuAnimation.BriskDuration
341+ easing: UbuntuAnimation.StandardEasing
345+ property: 'animatedTopMargin'
346+ from: content.height
348+ duration: UbuntuAnimation.BriskDuration
349+ easing: UbuntuAnimation.StandardEasing
351+ NumberAnimation { // opacity animation
352+ targets: [titleLabel,content]
356+ duration: UbuntuAnimation.FastDuration