┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRafael Fernández López <[email protected]>2007-07-14 17:45:42 +0000
committerRafael Fernández López <[email protected]>2007-07-14 17:45:42 +0000
commit8fb2f40f9c8ec1691590e56813c7d4b043fba559 (patch)
tree64108c003d27f4dd7b76ececb355bb604a778708 /src
parent255f9c1c95d0b73367fe483eef85937cbb6e103e (diff)
Fix small adjustments with items-categories
svn path=/trunk/KDE/kdebase/apps/; revision=687902
Diffstat (limited to 'src')
-rw-r--r--src/kcategorizedview.cpp34
1 files changed, 12 insertions, 22 deletions
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()));
}
}