@@ -70,6 +70,7 @@ SpreadDelegate {
7070
7171 priv.phase2StartScale = priv.easingAnimation(0, 1, root.startScale, root.endScale, phase2Progress)
7272 priv.phase2StartAngle = priv.easingAnimation(0, 1, root.startAngle, root.endAngle, phase2Progress)
73+ priv.phase2StartTopMarginProgress = priv.easingAnimation(0, 1, 0, 1, phase2Progress)
7374 }
7475 }
7576 }
@@ -87,6 +88,7 @@ SpreadDelegate {
8788 property real phase2StartTranslate
8889 property real phase2StartScale
8990 property real phase2StartAngle
91+ property real phase2StartTopMarginProgress
9092
9193 property bool isSelected: false
9294 property bool otherSelected: false
@@ -95,6 +97,7 @@ SpreadDelegate {
9597 property real selectedAngle
9698 property real selectedScale
9799 property real selectedOpacity
100+ property real selectedTopMarginProgress
98101
99102 function snapshot() {
100103 selectedProgress = root.progress;
@@ -102,9 +105,9 @@ SpreadDelegate {
102105 selectedAngle = angle;
103106 selectedScale = priv.scale;
104107 selectedOpacity = priv.opacityTransform;
108+ selectedTopMarginProgress = topMarginProgress;
105109// print("snapshotting at phase", spreadView.phase, negativeProgress);
106110// print("snapshotted", root.zIndex, "prog:", selectedProgress, "translate:", selectedXTranslate, "angle", selectedAngle, "scale", selectedScale)
107−// selectedTopMarginProgress = topMarginProgress;
108111 }
109112
110113 // This calculates how much negative progress there can be if unwinding the spread completely
@@ -300,6 +303,20 @@ SpreadDelegate {
300303 return 1;
301304 }
302305
306+ property real topMarginProgress: {
307+ if (priv.isSelected) {
308+ return linearAnimation(selectedProgress, negativeProgress, selectedTopMarginProgress, 0, root.progress);
309+ }
310+ switch (spreadView.phase) {
311+ case 0:
312+ return 0;
313+ case 1:
314+ return linearAnimation(spreadView.positionMarker2, spreadView.positionMarker4,
315+ 0, priv.phase2StartTopMarginProgress, root.progress);
316+ }
317+ return 1;
318+ }
319+
303320 states: [
304321 State {
305322 name: "sideStageDragging"; when: spreadView.sideStageDragging && root.isInSideStage
@@ -319,6 +336,11 @@ SpreadDelegate {
319336 xScale: priv.scale
320337 yScale: xScale
321338 },
339+ Scale {
340+ origin { x: 0; y: (spreadView.height * priv.scale) + maximizedAppTopMargin * 3 }
341+ xScale: 1
342+ yScale: isFullscreen ? 1 - priv.topMarginProgress * maximizedAppTopMargin / spreadView.height : 1
343+ },
322344 Translate {
323345 x: priv.xTranslate
324346 }