]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Get the biggest item size for recalculating scrollbar size.
authorAleix Pol Gonzalez <aleixpol@gmail.com>
Thu, 27 Dec 2007 12:57:04 +0000 (12:57 +0000)
committerAleix Pol Gonzalez <aleixpol@gmail.com>
Thu, 27 Dec 2007 12:57:04 +0000 (12:57 +0000)
This patch was made by ereslibre, I'm commiting it because he is kind of offline.

svn path=/trunk/KDE/kdebase/apps/; revision=753426

src/kcategorizedview.cpp

index 125316cbc35cb7656239544cf275720b8145d676..b2504a14bdb2411ee2422ff26fda00992d14dfde 100644 (file)
@@ -396,7 +396,7 @@ void KCategorizedView::Private::updateScrollbars()
     QModelIndex lastIndex = categoriesIndexes.isEmpty() ? QModelIndex() : categoriesIndexes[categories.last()].last();
 
     int lastItemBottom = cachedRectIndex(lastIndex).top() +
-                         listView->spacing() + (listView->gridSize().isEmpty() ? cachedRectIndex(lastIndex).height() : listView->gridSize().height()) - listView->viewport()->height();
+                         listView->spacing() + (listView->gridSize().isEmpty() ? biggestItemSize.height() : listView->gridSize().height()) - listView->viewport()->height();
 
     listView->horizontalScrollBar()->setRange(0, 0);