X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/255f9c1c95d0b73367fe483eef85937cbb6e103e..d511752c9de4d9adc30a15ddf9bf89efc1924a7b:/src/kcategorizedview.cpp diff --git a/src/kcategorizedview.cpp b/src/kcategorizedview.cpp index 8c1bcad51..214fa39d2 100644 --- a/src/kcategorizedview.cpp +++ b/src/kcategorizedview.cpp @@ -201,20 +201,15 @@ QRect KCategorizedView::Private::visualRectInViewport(const QModelIndex &index) if (rows - trunc(rows)) rowsInt++; + retRect.setTop(retRect.top() + + (rowsInt * itemHeight) + + itemCategorizer->categoryHeight(listView->viewOptions()) + + listView->spacing() * 2); + if (listView->gridSize().isEmpty()) { retRect.setTop(retRect.top() + - (rowsInt * listView->spacing()) + - (rowsInt * itemHeight) + - itemCategorizer->categoryHeight(listView->viewOptions()) + - listView->spacing() * 2); - } - else - { - retRect.setTop(retRect.top() + - (rowsInt * itemHeight) + - itemCategorizer->categoryHeight(listView->viewOptions()) + - listView->spacing()); + (rowsInt * listView->spacing())); } } @@ -290,20 +285,15 @@ QRect KCategorizedView::Private::visualCategoryRectInViewport(const QString &cat if (rows - trunc(rows)) rowsInt++; + retRect.setTop(retRect.top() + + (rowsInt * itemHeight) + + itemCategorizer->categoryHeight(listView->viewOptions()) + + listView->spacing() * 2); + if (listView->gridSize().isEmpty()) { retRect.setTop(retRect.top() + - (rowsInt * listView->spacing()) + - (rowsInt * itemHeight) + - itemCategorizer->categoryHeight(listView->viewOptions()) + - listView->spacing() * 2); - } - else - { - retRect.setTop(retRect.top() + - (rowsInt * itemHeight) + - itemCategorizer->categoryHeight(listView->viewOptions()) + - listView->spacing()); + (rowsInt * listView->spacing())); } }