Commit 954c46ec authored by Marco Martin's avatar Marco Martin
Browse files

go at beginning of page when switching

parent 7fe20889
......@@ -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: {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment