summaryrefslogtreecommitdiffstats
path: root/src/pdf/quick/qml/PdfPageView.qml
diff options
context:
space:
mode:
Diffstat (limited to 'src/pdf/quick/qml/PdfPageView.qml')
-rw-r--r--src/pdf/quick/qml/PdfPageView.qml10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/pdf/quick/qml/PdfPageView.qml b/src/pdf/quick/qml/PdfPageView.qml
index ec3cd78e0..dfd00a1a8 100644
--- a/src/pdf/quick/qml/PdfPageView.qml
+++ b/src/pdf/quick/qml/PdfPageView.qml
@@ -37,6 +37,7 @@ import QtQuick 2.14
import QtQuick.Controls 2.14
import QtQuick.Pdf 5.15
import QtQuick.Shapes 1.14
+import Qt.labs.animation 1.0
Rectangle {
// public API
@@ -260,4 +261,13 @@ Rectangle {
id: tapHandler
acceptedDevices: PointerDevice.Mouse | PointerDevice.Stylus
}
+ // prevent it from being scrolled out of view
+ BoundaryRule on x {
+ minimum: 100 - root.width
+ maximum: root.parent.width - 100
+ }
+ BoundaryRule on y {
+ minimum: 100 - root.height
+ maximum: root.parent.height - 100
+ }
}