- const bool rowArrangement = (settings->arrangement() == QListView::TopToBottom);
- if (rowArrangement) {
- // The decoration width indirectly defines the maximum
- // width for the text wrapping. To use the maximum item width
- // for text wrapping, it is used as decoration width.
- m_decorationSize = QSize(itemWidth, size);
- setIconSize(QSize(itemWidth, size));
- } else {
- m_decorationSize = QSize(size, size);
- setIconSize(QSize(size, size));
- }
-
- m_itemSize = QSize(itemWidth, itemHeight);
-
- // optimize the spacing of the grid in a way to prevent large gaps on the