@@ -127,15 +127,15 @@ Item {
127 // page title
127 // page title
129 id: titleLabel
129 id: titleLabel
130+ property real animatedMargin: 0
130 anchors {
131 anchors {
131 left: parent.left
132 left: parent.left
132 right: parent.right
133 right: parent.right
133 bottom: parent.bottom
134 bottom: parent.bottom
134 bottomMargin: bottomMargin
135 bottomMargin: bottomMargin
135− leftMargin: leftMargin
136+ leftMargin: leftMargin + titleLabel.animatedMargin
136 rightMargin: rightMargin
137 rightMargin: rightMargin
139 text: title
139 text: title
140 color: customTitle ? textColor : backgroundColor
140 color: customTitle ? textColor : backgroundColor
141 fontSize: customTitle ? "large" : "x-large"
141 fontSize: customTitle ? "large" : "x-large"
@@ -195,11 +195,13 @@ Item {
195 // content
195 // content
197 id: contentHolder
197 id: contentHolder
198+ property real animatedMargin: 0
198 anchors {
199 anchors {
199 top: titleRect.bottom
200 top: titleRect.bottom
200 left: parent.left
201 left: parent.left
201 right: parent.right
202 right: parent.right
202 bottom: buttonBarVisible ? buttonRect.top : parent.top
203 bottom: buttonBarVisible ? buttonRect.top : parent.top
204+ leftMargin: contentHolder.animatedMargin
@@ -247,4 +249,73 @@ Item {
255+ function aboutToShow(duration, direction) {
256+ startContentAnimation(duration, direction)
257+ startShowing(duration)
260+ function startContentAnimation(duration, direction) {
261+ contentAnimation.animationDurationBase = duration
262+ contentAnimation.direction = direction
263+ contentAnimation.restart()
266+ function startShowing(showDuration) {
267+ actionsShowAnimation.showDuration = showDuration
268+ actionsShowAnimation.restart()
271+ SequentialAnimation {
272+ id: actionsShowAnimation
273+ property int showDuration: 0
279+ PauseAnimation { duration: Math.max(0, actionsShowAnimation.showDuration - UbuntuAnimation.SnapDuration) }
284+ duration: UbuntuAnimation.SnapDuration
288+ SequentialAnimation {
289+ id: contentAnimation
290+ property int animationDurationBase: UbuntuAnimation.BriskDuration
291+ readonly property int additionalDuration: 200
292+ property int direction: Qt.LeftToRight
295+ if (contentAnimation.direction === Qt.LeftToRight) {
296+ titleLabel.animatedMargin = -titleRect.width;
297+ content.animatedMargin = -content.width;
299+ titleLabel.animatedMargin = titleRect.width;
300+ content.animatedMargin = content.width;
306+ targets: [titleLabel, content]
307+ property: 'animatedMargin'
309+ duration: contentAnimation.animationDurationBase + contentAnimation.additionalDuration
310+ easing.type: Easing.OutCubic
313+ targets: [titleLabel,content]
317+ duration: contentAnimation.animationDurationBase