mirror of
https://invent.kde.org/graphics/okular
synced 2024-08-24 18:35:37 +00:00
hide old delegate when pinching
This commit is contained in:
parent
a1ec69a146
commit
518a3546c4
|
@ -118,6 +118,7 @@ MouseEventListener {
|
|||
startHeight = mainPage.height
|
||||
startY = pinch.center.y
|
||||
startX = pinch.center.x
|
||||
pageArea.oldDelegate.visible = false
|
||||
}
|
||||
onPinchUpdated: {
|
||||
var deltaWidth = mainPage.width < imageMargin.width ? ((startWidth * pinch.scale) - mainPage.width) : 0
|
||||
|
@ -128,10 +129,11 @@ MouseEventListener {
|
|||
mainFlickable.contentY += pinch.previousCenter.y - pinch.center.y + startY * (pinch.scale - pinch.previousScale) - deltaHeight
|
||||
|
||||
mainFlickable.contentX += pinch.previousCenter.x - pinch.center.x + startX * (pinch.scale - pinch.previousScale) - deltaWidth
|
||||
pageArea.oldDelegate.scale(mainPage.width / mainPage.implicitWidth)
|
||||
}
|
||||
onPinchFinished: {
|
||||
mainFlickable.returnToBounds()
|
||||
pageArea.oldDelegate.scale(mainPage.width / mainPage.implicitWidth)
|
||||
pageArea.oldDelegate.visible = true
|
||||
}
|
||||
|
||||
Okular.PageItem {
|
||||
|
|
Loading…
Reference in a new issue