┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2012-02-16 16:36:22 +0100
committerPeter Penz <[email protected]>2012-02-16 16:37:36 +0100
commita5becac42cded392b957e71fcd433082c604a41f (patch)
tree06a1a6a8a2d77d1e989ade74481a67c0791504bb
parent613758b5ec7c57a5c115ae7a40ccaff71b923db2 (diff)
Compact view: Fix of left margin for first group
-rw-r--r--src/kitemviews/kitemlistviewlayouter.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/kitemviews/kitemlistviewlayouter.cpp b/src/kitemviews/kitemlistviewlayouter.cpp
index de78b7636..14774c412 100644
--- a/src/kitemviews/kitemlistviewlayouter.cpp
+++ b/src/kitemviews/kitemlistviewlayouter.cpp
@@ -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;
}