@@ -25,21 +25,31 @@ QtObject {
2525 // Input
2626 property int itemIndex: 0
2727 property int normalZ: 0
28− property real progress: 0
2928 property int startWidth: 0
3029 property int startHeight: 0
3130 property int startX: 0
3231 property int targetX: 0
3332 property int startY: 0
3433 property int targetY: 0
35−// property real startAngle: 40
3634 property real targetAngle: 0
3735 property int targetHeight: 0
3836 property real targetScale: 0
37+ property real swipeProgress: 0
38+ property real pushProgress: 0
3939
4040 // Config
4141 property real breakPoint: 0.4
4242
43+ // internal
44+ readonly property real progress: {
45+ if (pushProgress > 0) {
46+ // we don't do the full animation when pushing, just a little bit
47+ return MathUtils.linearAnimation(0, 1, 0, breakPoint + .1, pushProgress)
48+ } else {
49+ return swipeProgress;
50+ }
51+ }
52+
4353 // Output
4454
4555 readonly property real scaleToPreviewProgress: {
@@ -68,12 +78,17 @@ QtObject {
6878
6979 readonly property int animatedZ: {
7080 if (progress < breakPoint + (1 - breakPoint) / 2) {
71− return itemIndex == 1 ? normalZ + 2 : normalZ
81+ if (swipeProgress > 0) {
82+ return itemIndex == 1 ? normalZ + 2 : normalZ
83+ }
84+ if (pushProgress > 0) {
85+ return normalZ;
86+ }
7287 }
7388 return itemIndex
7489 }
7590
76− readonly property real opacityMask: itemIndex == 1 ? MathUtils.linearAnimation(0, breakPoint, 0, 1, progress) : 1
91+ readonly property real opacityMask: (swipeProgress > 0 && itemIndex == 1) ? MathUtils.linearAnimation(0, breakPoint, 0, 1, progress) : 1
7792
7893 readonly property real animatedScale: progress < breakPoint ? 1 : MathUtils.linearAnimation(breakPoint, 1, 1, targetScale, progress)
7994