]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/kitemviews/kitemlistcontainer.cpp
Make sure that widgets are initialized when changing the view mode
[dolphin.git] / src / kitemviews / kitemlistcontainer.cpp
index 5500851c8c92c564bf3130c66198cea9b61eb8c7..3bd8067a8f3c9b0be16e11f91ac1d4ce29b30155 100644 (file)
@@ -261,7 +261,9 @@ void KItemListContainer::updateScrollOffsetScrollBar()
         smoothScroller = m_verticalSmoothScroller;
         scrollOffsetScrollBar = verticalScrollBar();
         singleStep = view->itemSize().height();
-        pageStep = view->size().height();
+        // We cannot use view->size().height() because this height might
+        // include the header widget, which is not part of the scrolled area.
+        pageStep = view->verticalPageStep();
     } else {
         smoothScroller = m_horizontalSmoothScroller;
         scrollOffsetScrollBar = horizontalScrollBar();