1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 02:36:34 +01:00

[SiteInfo] Set correct height of list view according to icons.

See #633
This commit is contained in:
nowrep 2013-05-27 18:00:20 +02:00
parent 9725f53bbf
commit 77abf8493a

View File

@ -98,11 +98,8 @@ QSize ListItemDelegate::sizeHint(const QStyleOptionViewItem &option, const QMode
// Update height of parent widget
QWidget* p = qobject_cast<QWidget*>(parent());
if (p && m_updateParentHeight) {
p->setFixedHeight(m_itemHeight
#ifdef Q_OS_WIN
+ 4 // Vertical padding 2px on Windows
#endif
);
int frameWidth = p->style()->pixelMetric(QStyle::PM_DefaultFrameWidth, 0, p);
p->setFixedHeight(m_itemHeight + 2 * frameWidth);
}
}