From 6c29a1d98a490e585d0e9d9a4eb4824e72756390 Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Wed, 7 Dec 2011 15:30:55 +0100 Subject: Fix icon boundaries issue The size of the icon boundaries should be as minimal as possible. The patch for fixing the zooming-issues with the selection resulted into a minor regression where the icon boundaries might be too large. This patch remembers the original size of the pixmap to be able to scale m_iconRect. --- src/kitemviews/kfileitemlistwidget.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/kitemviews/kfileitemlistwidget.h') diff --git a/src/kitemviews/kfileitemlistwidget.h b/src/kitemviews/kfileitemlistwidget.h index 5baaa1b28..8f7397b75 100644 --- a/src/kitemviews/kfileitemlistwidget.h +++ b/src/kitemviews/kfileitemlistwidget.h @@ -139,8 +139,9 @@ private: QPixmap m_pixmap; QSize m_scaledPixmapSize; - QRectF m_hoverPixmapRect; - QPixmap m_hoverPixmap; + QSize m_originalPixmapSize; // Size of pixmap before it gets converted to a square pixmap + QRectF m_iconRect; // Cache for KItemListWidget::iconRect() + QPixmap m_hoverPixmap; // Cache for modified m_pixmap when hovering the item QPointF m_textPos[TextIdCount]; QStaticText m_text[TextIdCount]; -- cgit v1.3.1