on xenial help sign in
fix negative progress causing invisible tiles
0562e66Michael Zanetti
qml/Stage/DecoratedWindow.qml+1−1
@@ -82,7 +82,7 @@ FocusScope {
82 StateGroup {
82 StateGroup {
83 states: [
83 states: [
84 State {
84 State {
85− name: "normal"; when: root.scaleToPreviewProgress == 0
85+ name: "normal"; when: root.scaleToPreviewProgress <= 0
86 PropertyChanges {
86 PropertyChanges {
87 target: root
87 target: root
88 implicitWidth: applicationWindow.implicitWidth
88 implicitWidth: applicationWindow.implicitWidth
qml/Stage/Spread/StagedRightEdgeMaths.qml+1−2
@@ -35,8 +35,7 @@ QtObject {
35 // Output
35 // Output
36
36
37 readonly property real scaleToPreviewProgress: {
37 readonly property real scaleToPreviewProgress: {
38−// print("scaleProg:", progress < breakPoint ? 0 : MathUtils.linearAnimation(breakPoint, 1.0, 0.0, 1.0, progress))
39− return progress < breakPoint ? 0 : MathUtils.linearAnimation(0.5, 1.0, 0.0, 1.0, progress)
38+ return progress < breakPoint ? 0 : MathUtils.clamp(MathUtils.linearAnimation(0.5, 1.0, 0.0, 1.0, progress), 0, 1)
40 }
39 }
41 readonly property int animatedWidth: {
40 readonly property int animatedWidth: {
42 return progress < breakPoint ? root.sceneHeight : MathUtils.linearAnimation(breakPoint, 1, root.sceneWidth, targetHeight, progress)
41 return progress < breakPoint ? root.sceneHeight : MathUtils.linearAnimation(breakPoint, 1, root.sceneWidth, targetHeight, progress)
qml/Stage/Stage.qml+1−17
@@ -819,7 +819,7 @@ AbstractStage {
819 targetScale: spreadMaths.targetScale
819 targetScale: spreadMaths.targetScale
820 }
820 }
821
821
822−// onXChanged: if (model.application.appId == "unity8-dash") print("dash moved to", x)
822+ onXChanged: if (model.application.appId == "unity8-dash") print("dash moved to", x)
823// onRequestedWidthChanged: if (index == 0) print("requestedWidth", requestedWidth)
823// onRequestedWidthChanged: if (index == 0) print("requestedWidth", requestedWidth)
824 onStateChanged: if (model.application.appId == "unity8-dash") print("state changed", state)
824 onStateChanged: if (model.application.appId == "unity8-dash") print("state changed", state)
825 states: [
825 states: [
@@ -1304,24 +1304,8 @@ AbstractStage {
1304 property var gesturePoints: new Array()
1304 property var gesturePoints: new Array()
1305
1305
1306 property real progress: -touchPosition.x / root.width
1306 property real progress: -touchPosition.x / root.width
1307−// onProgressChanged: print("dda progress", progress, root.width, touchPosition.x, root.width + touchPosition.x)
1308
1307
1309−// Rectangle { color: "blue"; anchors.fill: parent }
1310 onTouchPositionChanged: {
1308 onTouchPositionChanged: {
1311− if (dragging) {
1312− // Gesture recognized. Let's move the spreadView with the finger
1313−// var dragX = Math.min(touchX + width, width); // Prevent dragging rightwards
1314−// dragX = -dragX + spreadDragArea.width - spreadView.shift;
1315−// // Don't allow dragging further than the animation crossing with phase2's animation
1316−// var maxMovement = spreadView.width * spreadView.positionMarker4 - spreadView.shift;
1317−
1318−// spreadView.contentX = Math.min(dragX, maxMovement);
1319− } else {
1320−// // Initial touch. Let's reset the spreadView to the starting position.
1321−// spreadView.phase = 0;
1322−// spreadView.contentX = -spreadView.shift;
1323− }
1324−
1325 gesturePoints.push(touchPosition.x);
1309 gesturePoints.push(touchPosition.x);
1326 }
1310 }
1327
1311