]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Fix small adjustments with items-categories
authorRafael Fernández López <ereslibre@kde.org>
Sat, 14 Jul 2007 17:45:42 +0000 (17:45 +0000)
committerRafael Fernández López <ereslibre@kde.org>
Sat, 14 Jul 2007 17:45:42 +0000 (17:45 +0000)
svn path=/trunk/KDE/kdebase/apps/; revision=687902

src/kcategorizedview.cpp

index 8c1bcad51c5a6d4537d4479efa0ba08296cb89fc..214fa39d236ea23df61ed2ad273673df03b1f12a 100644 (file)
@@ -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()));
         }
     }