diff options
| author | Peter Penz <[email protected]> | 2012-02-08 17:45:22 +0100 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2012-02-08 17:48:32 +0100 |
| commit | 03415d90783979f8e51880b7950721985fee29bf (patch) | |
| tree | 2e38e2cddbc293f1fa3be44729a079bf03d4ec45 /src/kitemviews/kitemlistviewlayouter_p.h | |
| parent | 3c83d8f14defbec5f09aeeb78de3885535d2dc71 (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/kitemlistviewlayouter_p.h')
| -rw-r--r-- | src/kitemviews/kitemlistviewlayouter_p.h | 12 |
1 files changed, 9 insertions, 3 deletions
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 @@ -48,6 +48,12 @@ public: 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 * used. @@ -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; |
