]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Compact view: Fix of left margin for first group
authorPeter Penz <peter.penz19@gmail.com>
Thu, 16 Feb 2012 15:36:22 +0000 (16:36 +0100)
committerPeter Penz <peter.penz19@gmail.com>
Thu, 16 Feb 2012 15:37:36 +0000 (16:37 +0100)
src/kitemviews/kitemlistviewlayouter.cpp

index de78b763677bdfb3b5a937d2a6d50780fd419576..14774c4121dac3de30539a0b51c9724d0c67acfb 100644 (file)
@@ -392,15 +392,15 @@ void KItemListViewLayouter::doLayout()
                     // The item is the first item of a group.
                     // Increase the y-position to provide space
                     // for the group header.
-                    if (index == 0) {
-                        // The first group header should be aligned on top
-                        y -= itemMargin.height();
-                    } else {
+                    if (index > 0) {
                         // Only add a margin if there has been added another
                         // group already before
                         y += m_groupHeaderMargin;
+                    } else if (!horizontalScrolling) {
+                        // The first group header should be aligned on top
+                        y -= itemMargin.height();
                     }
-                    
+
                     if (!horizontalScrolling) {
                         y += m_groupHeaderHeight;
                     }