diff options
| author | Peter Penz <[email protected]> | 2012-05-09 14:03:11 +0200 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2012-05-09 14:04:04 +0200 |
| commit | 9641672247fad1ce4aa0eb31631db40900884248 (patch) | |
| tree | 027fe247193913a6d44b3458bbbe4db4ce86b00c /src | |
| parent | 321f747ddf9cf71ed3c8fa4de287d131cd22c2d8 (diff) | |
Let the group-headers respect the item-offset
Diffstat (limited to 'src')
| -rw-r--r-- | src/kitemviews/kitemlistview.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/kitemviews/kitemlistview.cpp b/src/kitemviews/kitemlistview.cpp index 4bcdab105..d1d8749aa 100644 --- a/src/kitemviews/kitemlistview.cpp +++ b/src/kitemviews/kitemlistview.cpp @@ -1905,8 +1905,10 @@ void KItemListView::updateGroupHeaderLayout(KItemListWidget* widget) // In the vertical scroll orientation the group header should always span // the whole width no matter which temporary position the parent widget // has. In this case the x-position and width will be adjusted manually. - groupHeader->setPos(-widget->x(), -groupHeaderRect.height()); - groupHeader->resize(size().width(), groupHeaderRect.size().height()); + const qreal x = -widget->x() - itemOffset(); + const qreal width = maximumItemOffset(); + groupHeader->setPos(x, -groupHeaderRect.height()); + groupHeader->resize(width, groupHeaderRect.size().height()); } else { groupHeader->setPos(groupHeaderRect.x() - itemRect.x(), -widget->y()); groupHeader->resize(groupHeaderRect.size()); |
