diff options
| author | Frank Reininghaus <[email protected]> | 2014-06-05 08:57:31 +0200 |
|---|---|---|
| committer | Frank Reininghaus <[email protected]> | 2014-06-05 08:57:31 +0200 |
| commit | c12dc996f535f787ab828560068a2c8b7f98c5cf (patch) | |
| tree | 479d4363cd26849fc406641092196c4eaefc27b8 /src/kitemviews/private/kitemlistviewlayouter.cpp | |
| parent | 470e305be419646a3e1301cd9942be5f1ece58d9 (diff) | |
| parent | ea713e7a791e4685be6d3c22756d59cef91fa77a (diff) | |
Merge remote-tracking branch 'origin/master' into frameworks
Diffstat (limited to 'src/kitemviews/private/kitemlistviewlayouter.cpp')
| -rw-r--r-- | src/kitemviews/private/kitemlistviewlayouter.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/kitemviews/private/kitemlistviewlayouter.cpp b/src/kitemviews/private/kitemlistviewlayouter.cpp index 9da5384d4..04325c7d0 100644 --- a/src/kitemviews/private/kitemlistviewlayouter.cpp +++ b/src/kitemviews/private/kitemlistviewlayouter.cpp @@ -239,6 +239,7 @@ QRectF KItemListViewLayouter::itemRect(int index) const // to get the physical horizontal direction QPointF pos(y, x); pos.rx() -= m_scrollOffset; + sizeHint.transpose(); return QRectF(pos, sizeHint); } @@ -282,7 +283,9 @@ QRectF KItemListViewLayouter::groupHeaderRect(int index) const break; } - const qreal itemWidth = m_sizeHintResolver->sizeHint(index).width(); + const qreal itemWidth = (m_scrollOrientation == Qt::Vertical) + ? m_sizeHintResolver->sizeHint(index).width() + : m_sizeHintResolver->sizeHint(index).height(); if (itemWidth > headerWidth) { headerWidth = itemWidth; @@ -461,7 +464,7 @@ void KItemListViewLayouter::doLayout() while (index < itemCount && column < m_columnCount) { qreal requiredItemHeight = itemSize.height(); const QSizeF sizeHint = m_sizeHintResolver->sizeHint(index); - const qreal sizeHintHeight = horizontalScrolling ? sizeHint.width() : sizeHint.height(); + const qreal sizeHintHeight = sizeHint.height(); if (sizeHintHeight > requiredItemHeight) { requiredItemHeight = sizeHintHeight; } |
