summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@qt.io>2022-04-20 10:27:16 +0200
committerShawn Rutledge <shawn.rutledge@qt.io>2022-04-22 07:57:40 +0200
commitdc0eff5dcda8bf110031eb67e04daab110cdaea0 (patch)
treed7dced965df1e941ec576911f2c015bb319da276 /src
parent6dd55011f00c265c8353e1aab1a692d651fcd2ab (diff)
downloadqtwebengine-dc0eff5dcda8bf110031eb67e04daab110cdaea0.tar.gz
PdfMultiPageView: re-layout when size changes
Fixes: QTBUG-102746 Change-Id: I75528f86a2c8b3d61f73929ea64a1ce2f5e54167 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/pdfquick/PdfMultiPageView.qml2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/pdfquick/PdfMultiPageView.qml b/src/pdfquick/PdfMultiPageView.qml
index a26bca700..bf4cb4602 100644
--- a/src/pdfquick/PdfMultiPageView.qml
+++ b/src/pdfquick/PdfMultiPageView.qml
@@ -351,6 +351,8 @@ Item {
property real rotationNorm: Math.round((360 + (root.pageRotation % 360)) % 360)
property bool rot90: rotationNorm == 90 || rotationNorm == 270
onRot90Changed: forceLayout()
+ onHeightChanged: forceLayout()
+ onWidthChanged: forceLayout()
property size firstPagePointSize: document?.status === PdfDocument.Ready ? document.pagePointSize(0) : Qt.size(1, 1)
property real pageHolderWidth: Math.max(root.width, ((rot90 ? document?.maxPageHeight : document?.maxPageWidth) ?? 0) * root.renderScale)
columnWidthProvider: function(col) { return document ? pageHolderWidth + vscroll.width + 2 : 0 }