summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarco Martin <notmart@gmail.com>2016-05-13 16:07:37 (GMT)
committerMarco Martin <notmart@gmail.com>2016-05-13 16:07:37 (GMT)
commit954c46ec46c348146321d8a791d0b4aba87b293f (patch)
treed88d8c26d65e82c532ec31b24fdbf85348f991c6
parent7fe208892dfe051549ce579fffefbd2fa9894d6c (diff)
go at beginning of page when switching
-rw-r--r--mobile/components/DocumentView.qml27
1 files changed, 19 insertions, 8 deletions
diff --git a/mobile/components/DocumentView.qml b/mobile/components/DocumentView.qml
index b7735e2..5bd3769 100644
--- a/mobile/components/DocumentView.qml
+++ b/mobile/components/DocumentView.qml
@@ -226,14 +226,25 @@ QtControls.ScrollView {
SequentialAnimation {
id: switchAnimation
- NumberAnimation {
- target: mouseArea.currPageDelegate
- properties: "x"
- to: mouseArea.incrementing ? -mouseArea.currPageDelegate.width : mouseArea.currPageDelegate.width
- easing.type: Easing.InQuad
- //hardcoded number, we would need units from plasma
- //which cannot depend from here
- duration: 250
+ ParallelAnimation {
+ NumberAnimation {
+ target: flick
+ properties: "contentY"
+ to: 0
+ easing.type: Easing.InQuad
+ //hardcoded number, we would need units from kirigami
+ //which cannot depend from here
+ duration: 250
+ }
+ NumberAnimation {
+ target: mouseArea.currPageDelegate
+ properties: "x"
+ to: mouseArea.incrementing ? -mouseArea.currPageDelegate.width : mouseArea.currPageDelegate.width
+ easing.type: Easing.InQuad
+ //hardcoded number, we would need units from kirigami
+ //which cannot depend from here
+ duration: 250
+ }
}
ScriptAction {
script: {