on xenial help sign in
move position markers more to the right
8162302Michael Zanetti
qml/Stages/PhoneStage.qml+7−13
@@ -145,16 +145,16 @@ Rectangle {
145
145
146 // Those markers mark the various positions in the spread (ratio to screen width from right to left):
146 // Those markers mark the various positions in the spread (ratio to screen width from right to left):
147 // 0 - 1: following finger, snap back to the beginning on release
147 // 0 - 1: following finger, snap back to the beginning on release
148− property real positionMarker1: 0.3
148+ property real positionMarker1: 0.2
149 // 1 - 2: curved snapping movement, snap to app 1 on release
149 // 1 - 2: curved snapping movement, snap to app 1 on release
150− property real positionMarker2: 0.45
150+ property real positionMarker2: 0.3
151 // 2 - 3: movement follows finger, snaps back to app 1 on release
151 // 2 - 3: movement follows finger, snaps back to app 1 on release
152− property real positionMarker3: 0.6
152+ property real positionMarker3: 0.4
153 // passing 3, we detach movement from the finger and snap to 4
153 // passing 3, we detach movement from the finger and snap to 4
154 property real positionMarker4: 0.9
154 property real positionMarker4: 0.9
155
155
156 // This is where the first app snaps to when bringing it in from the right edge.
156 // This is where the first app snaps to when bringing it in from the right edge.
157− property real snapPosition: 0.75
157+ property real snapPosition: 0.7
158
158
159 // Phase of the animation:
159 // Phase of the animation:
160 // 0: Starting from right edge, a new app (index 1) comes in from the right
160 // 0: Starting from right edge, a new app (index 1) comes in from the right
@@ -367,8 +367,9 @@ Rectangle {
367 if (spreadView.phase == 0 && index < 2) {
367 if (spreadView.phase == 0 && index < 2) {
368 if (progress < spreadView.positionMarker1) {
368 if (progress < spreadView.positionMarker1) {
369 return progress;
369 return progress;
370− } else if (progress < spreadView.positionMarker1 + snappingCurve.period){
370+ } else if (progress < spreadView.positionMarker1 + 0.05){
371− return spreadView.positionMarker1 + snappingCurve.value * 3;
371+ // p : 0.05 = x : pm2
372+ return spreadView.positionMarker1 + (progress - spreadView.positionMarker1) * (spreadView.positionMarker2 - spreadView.positionMarker1) / 0.05
372 } else {
373 } else {
373 return spreadView.positionMarker2;
374 return spreadView.positionMarker2;
374 }
375 }
@@ -380,13 +381,6 @@ Rectangle {
380 visible: (progress >= 0 && progress < 1.7) ||
381 visible: (progress >= 0 && progress < 1.7) ||
381 (isDash && priv.focusedAppDelegate.x !== 0)
382 (isDash && priv.focusedAppDelegate.x !== 0)
382
383
383− EasingCurve {
384− id: snappingCurve
385− type: EasingCurve.Linear
386− period: 0.05
387− progress: appDelegate.progress - spreadView.positionMarker1
388− }
389−
390 Binding {
384 Binding {
391 target: appDelegate
385 target: appDelegate
392 property: "orientation"
386 property: "orientation"