From 743bec375187a51ed6b88256ff070e9f7e9f4929 Mon Sep 17 00:00:00 2001 From: Rafael Fernández López Date: Wed, 2 Jan 2008 01:21:39 +0000 Subject: Better looking categories. Thanks to Aurélien Gâteau for the original patch. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CCMAIL: kde-core-devel@kde.org svn path=/trunk/KDE/kdebase/apps/; revision=755674 --- src/kcategorizedview.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/kcategorizedview.cpp') diff --git a/src/kcategorizedview.cpp b/src/kcategorizedview.cpp index b2504a14b..51b4a000b 100644 --- a/src/kcategorizedview.cpp +++ b/src/kcategorizedview.cpp @@ -129,12 +129,12 @@ QRect KCategorizedView::Private::visualRectInViewport(const QModelIndex &index) if (listView->layoutDirection() == Qt::LeftToRight) { retRect = QRect(listView->spacing(), listView->spacing() * 2 + - categoryDrawer->categoryHeight(listView->viewOptions()), 0, 0); + categoryDrawer->categoryHeight(index, listView->viewOptions()), 0, 0); } else { retRect = QRect(listView->viewport()->width() - listView->spacing(), listView->spacing() * 2 + - categoryDrawer->categoryHeight(listView->viewOptions()), 0, 0); + categoryDrawer->categoryHeight(index, listView->viewOptions()), 0, 0); } int viewportWidth = listView->viewport()->width() - listView->spacing(); @@ -189,7 +189,7 @@ QRect KCategorizedView::Private::visualRectInViewport(const QModelIndex &index) retRect.setTop(retRect.top() + (rowsInt * itemHeight) + - categoryDrawer->categoryHeight(listView->viewOptions()) + + categoryDrawer->categoryHeight(index, listView->viewOptions()) + listView->spacing() * 2); if (listView->gridSize().isEmpty()) @@ -273,7 +273,7 @@ QRect KCategorizedView::Private::visualCategoryRectInViewport(const QString &cat retRect.setTop(retRect.top() + (rowsInt * itemHeight) + - categoryDrawer->categoryHeight(listView->viewOptions()) + + categoryDrawer->categoryHeight(index, listView->viewOptions()) + listView->spacing() * 2); if (listView->gridSize().isEmpty()) @@ -283,7 +283,7 @@ QRect KCategorizedView::Private::visualCategoryRectInViewport(const QString &cat } } - retRect.setHeight(categoryDrawer->categoryHeight(listView->viewOptions())); + retRect.setHeight(categoryDrawer->categoryHeight(index, listView->viewOptions())); return retRect; } -- cgit v1.3