summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/pdf/qpdflinkmodel.cpp2
-rw-r--r--src/pdf/quick/qml/PdfMultiPageView.qml10
2 files changed, 11 insertions, 1 deletions
diff --git a/src/pdf/qpdflinkmodel.cpp b/src/pdf/qpdflinkmodel.cpp
index 8b49fec21..96e6ddd5c 100644
--- a/src/pdf/qpdflinkmodel.cpp
+++ b/src/pdf/qpdflinkmodel.cpp
@@ -179,7 +179,7 @@ void QPdfLinkModelPrivate::update()
if (!ok)
break;
if (hasX && hasY)
- linkData.location = QPointF(x, y);
+ linkData.location = QPointF(x, pageHeight - y);
if (hasZoom)
linkData.zoom = zoom;
links << linkData;
diff --git a/src/pdf/quick/qml/PdfMultiPageView.qml b/src/pdf/quick/qml/PdfMultiPageView.qml
index b64f44576..b4bc61c64 100644
--- a/src/pdf/quick/qml/PdfMultiPageView.qml
+++ b/src/pdf/quick/qml/PdfMultiPageView.qml
@@ -242,8 +242,10 @@ Item {
width: rect.width * paper.pageScale
height: rect.height * paper.pageScale
MouseArea { // TODO switch to TapHandler / HoverHandler in 5.15
+ id: linkMA
anchors.fill: parent
cursorShape: Qt.PointingHandCursor
+ hoverEnabled: true
onClicked: {
if (page >= 0)
root.goToLocation(page, location, zoom)
@@ -251,6 +253,14 @@ Item {
Qt.openUrlExternally(url)
}
}
+ ToolTip {
+ visible: linkMA.containsMouse
+ delay: 1000
+ text: page >= 0 ?
+ ("page " + (page + 1) +
+ " location " + location.x.toFixed(1) + ", " + location.y.toFixed(1) +
+ " zoom " + zoom) : url
+ }
}
}
}