restore contentY->offset sync

This commit is contained in:
Marco Martin 2021-04-12 13:49:29 +02:00
parent c8078b8288
commit 354ec7c8a5

View file

@ -105,7 +105,7 @@ Item {
Drag.dragType: Drag.Automatic Drag.dragType: Drag.Automatic
onOffsetChanged: { onOffsetChanged: {
if (!view.moving) { if (!view.moving) {print("BLII?"+offset)
view.contentY = Math.max(0, offset) - view.originY - view.height*2 + closedPositionOffset*2 view.contentY = Math.max(0, offset) - view.originY - view.height*2 + closedPositionOffset*2
} }
} }
@ -194,9 +194,10 @@ Item {
movementDirection = AppDrawer.MovementDirection.Up; movementDirection = AppDrawer.MovementDirection.Up;
} else { } else {
movementDirection = AppDrawer.MovementDirection.Down; movementDirection = AppDrawer.MovementDirection.Down;
}return; }
oldContentY = contentY; oldContentY = contentY;
root.offset = contentY + view.originY + view.height*2 //+ root.closedPositionOffset*2 root.offset = contentY + view.originY + view.height*2 - root.closedPositionOffset*2
MobileShell.HomeScreenControls.homeScreenPosition = contentY MobileShell.HomeScreenControls.homeScreenPosition = contentY
} }
onMovementEnded: root.snapDrawerStatus() onMovementEnded: root.snapDrawerStatus()