From 03415d90783979f8e51880b7950721985fee29bf Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Wed, 8 Feb 2012 17:45:22 +0100 Subject: 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 --- src/kitemviews/kitemlistviewlayouter_p.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'src/kitemviews/kitemlistviewlayouter_p.h') diff --git a/src/kitemviews/kitemlistviewlayouter_p.h b/src/kitemviews/kitemlistviewlayouter_p.h index 25f8eb6cd..af8a6dacb 100644 --- a/src/kitemviews/kitemlistviewlayouter_p.h +++ b/src/kitemviews/kitemlistviewlayouter_p.h @@ -47,6 +47,12 @@ public: void setItemSize(const QSizeF& size); QSizeF itemSize() const; + /** + * Margin between the rows and columns of items. + */ + void setItemMargin(const QSizeF& margin); + QSizeF itemMargin() const; + /** * Sets the height of the header that is always aligned * at the top. A height of <= 0.0 means that no header is @@ -61,8 +67,7 @@ public: */ void setGroupHeaderHeight(qreal height); qreal groupHeaderHeight() const; - - // TODO: add note that offset can be < 0 or > maximumOffset! + void setScrollOffset(qreal scrollOffset); qreal scrollOffset() const; @@ -138,7 +143,8 @@ private: QSizeF m_size; QSizeF m_itemSize; - qreal m_headerHeight; + QSizeF m_itemMargin; + qreal m_headerHeight; const KItemModelBase* m_model; const KItemListSizeHintResolver* m_sizeHintResolver; -- cgit v1.3.1