From 4333d4b0b57f785a782901ce2cc1ae77f63b274e Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Mon, 14 Jan 2008 16:29:12 +0000 Subject: [PATCH] Manually set the scrollbars range, so they are correct when the viewport is resized and the content widget has the same size. BUG: 155652 svn path=/trunk/KDE/kdegraphics/okular/; revision=761348 --- ui/pageview.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ui/pageview.cpp b/ui/pageview.cpp index 8417e69f3..88ec7de0a 100644 --- a/ui/pageview.cpp +++ b/ui/pageview.cpp @@ -2697,6 +2697,9 @@ void PageView::slotRelayoutPages() // 3) reset dirty state d->dirtyLayout = false; + horizontalScrollBar()->setRange( 0, qMax( 0, fullWidth - viewport()->width() ) ); + verticalScrollBar()->setRange( 0, qMax( 0, fullHeight - viewport()->height() ) ); + // 4) update scrollview's contents size and recenter view bool wasUpdatesEnabled = viewport()->updatesEnabled(); if ( fullWidth != widget()->width() || fullHeight != widget()->height() )