┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/kitemviews/kitemlistgroupheader.cpp
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2012-02-08 17:45:22 +0100
committerPeter Penz <[email protected]>2012-02-08 17:48:32 +0100
commit03415d90783979f8e51880b7950721985fee29bf (patch)
tree2e38e2cddbc293f1fa3be44729a079bf03d4ec45 /src/kitemviews/kitemlistgroupheader.cpp
parent3c83d8f14defbec5f09aeeb78de3885535d2dc71 (diff)
Layout optimizations
- Differ internally between margins and paddings - Add a small padding in the icons-view and the compact-views - Optimize the width of the icons-view if previews are shown
Diffstat (limited to 'src/kitemviews/kitemlistgroupheader.cpp')
-rw-r--r--src/kitemviews/kitemlistgroupheader.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/kitemviews/kitemlistgroupheader.cpp b/src/kitemviews/kitemlistgroupheader.cpp
index 8eff39901..03964e2b5 100644
--- a/src/kitemviews/kitemlistgroupheader.cpp
+++ b/src/kitemviews/kitemlistgroupheader.cpp
@@ -116,7 +116,7 @@ void KItemListGroupHeader::paint(QPainter* painter, const QStyleOptionGraphicsIt
if (m_scrollOrientation != Qt::Horizontal) {
painter->setPen(m_roleColor);
- const qreal y = m_roleBounds.y() - m_styleOption.margin;
+ const qreal y = m_roleBounds.y() - m_styleOption.padding;
painter->drawLine(0, y, size().width() - 1, y);
}
}
@@ -177,13 +177,13 @@ void KItemListGroupHeader::updateCache()
(c1.green() * p1 + c2.green() * p2) / 100,
(c1.blue() * p1 + c2.blue() * p2) / 100);
- const int margin = m_styleOption.margin;
+ const int padding = m_styleOption.padding;
const QFontMetrics fontMetrics(m_styleOption.font);
const qreal roleHeight = fontMetrics.height();
- m_roleBounds = QRectF(margin,
- size().height() - roleHeight - margin,
- size().width() - 2 * margin,
+ m_roleBounds = QRectF(padding,
+ size().height() - roleHeight - padding,
+ size().width() - 2 * padding,
roleHeight);
m_dirtyCache = false;