mirror of
https://invent.kde.org/graphics/okular
synced 2024-08-23 18:11:13 +00:00
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
This commit is contained in:
parent
b0245bd01d
commit
4333d4b0b5
|
@ -2697,6 +2697,9 @@ void PageView::slotRelayoutPages()
|
||||||
// 3) reset dirty state
|
// 3) reset dirty state
|
||||||
d->dirtyLayout = false;
|
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
|
// 4) update scrollview's contents size and recenter view
|
||||||
bool wasUpdatesEnabled = viewport()->updatesEnabled();
|
bool wasUpdatesEnabled = viewport()->updatesEnabled();
|
||||||
if ( fullWidth != widget()->width() || fullHeight != widget()->height() )
|
if ( fullWidth != widget()->width() || fullHeight != widget()->height() )
|
||||||
|
|
Loading…
Reference in a new issue