diff options
Diffstat (limited to 'src/kitemviews/kitemlistview.h')
| -rw-r--r-- | src/kitemviews/kitemlistview.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/kitemviews/kitemlistview.h b/src/kitemviews/kitemlistview.h index 50d8908e5..808ff5b3e 100644 --- a/src/kitemviews/kitemlistview.h +++ b/src/kitemviews/kitemlistview.h @@ -463,7 +463,9 @@ private: * the new grid- and item-size. Used to determine whether an animation * should be done when applying the new layout. */ - bool changesItemGridLayout(const QSizeF& newGridSize, const QSizeF& newItemSize) const; + bool changesItemGridLayout(const QSizeF& newGridSize, + const QSizeF& newItemSize, + const QSizeF& newItemMargin) const; /** * @param changedItemCount Number of inserted or removed items. @@ -497,6 +499,13 @@ private: * value != 0 will be returned. */ static int calculateAutoScrollingIncrement(int pos, int range, int oldInc); + + /** + * Helper functions for changesItemCount(). + * @return The number of items that fit into the available size by + * respecting the size of the item and the margin between the items. + */ + static int itemsPerSize(qreal size, qreal itemSize, qreal itemMargin); private: bool m_enabledSelectionToggles; |
