diff options
| author | Peter Penz <[email protected]> | 2011-12-07 15:30:55 +0100 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2011-12-07 15:34:34 +0100 |
| commit | 6c29a1d98a490e585d0e9d9a4eb4824e72756390 (patch) | |
| tree | df320bfb2d4ac00323958c0e3aa2e19b3a260052 /src/kitemviews/kitemlistwidget.cpp | |
| parent | 539b88cc5ffaf47fbf17894f06bdc43648853841 (diff) | |
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.
Diffstat (limited to 'src/kitemviews/kitemlistwidget.cpp')
| -rw-r--r-- | src/kitemviews/kitemlistwidget.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/kitemviews/kitemlistwidget.cpp b/src/kitemviews/kitemlistwidget.cpp index 687367adb..4934da84f 100644 --- a/src/kitemviews/kitemlistwidget.cpp +++ b/src/kitemviews/kitemlistwidget.cpp @@ -124,7 +124,7 @@ void KItemListWidget::paint(QPainter* painter, const QStyleOptionGraphicsItem* o const QRect iconBounds = iconRect().toRect(); const QRect textBounds = textRect().toRect(); - if (iconBounds.bottom() >= textBounds.top()) { + if (iconBounds.bottom() > textBounds.top()) { viewItemOption.rect = textBounds; } else { // See KItemListWidget::drawItemStyleOption(): The selection rectangle @@ -439,7 +439,7 @@ void KItemListWidget::drawItemStyleOption(QPainter* painter, QWidget* widget, QS viewItemOption.state = styleState; viewItemOption.viewItemPosition = QStyleOptionViewItemV4::OnlyOne; - if (iconBounds.bottom() >= textBounds.top()) { + if (iconBounds.bottom() > textBounds.top()) { viewItemOption.rect = iconBounds | textBounds; widget->style()->drawPrimitive(QStyle::PE_PanelItemViewItem, &viewItemOption, painter, widget); } else { |
