forked from qt-creator/qt-creator
Revert "Wizards: scale smaller icons if necessary"
This reverts commit 1646510ffa.
Had problems at highDPI and is not necessary since we have all
icons in the right size.
Task-number: QTCREATORBUG-18587
Change-Id: I544aa23f29db571cb9920f6ac7d462c2f463e24e
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
committed by
Alessandro Portale
parent
6d4472d6b4
commit
4895ea8371
@@ -91,21 +91,6 @@ public:
|
||||
|
||||
return true;
|
||||
}
|
||||
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override
|
||||
{
|
||||
if (role == Qt::DecorationRole) {
|
||||
// scale too small icons to have one size for all
|
||||
QIcon icon = qvariant_cast<QIcon>(QSortFilterProxyModel::data(index, role));
|
||||
if (!icon.isNull()) {
|
||||
QPixmap pixmap(icon.pixmap(ICON_SIZE, ICON_SIZE));
|
||||
if (pixmap.size() != QSize(ICON_SIZE, ICON_SIZE))
|
||||
return pixmap.scaled(ICON_SIZE, ICON_SIZE, Qt::KeepAspectRatio, Qt::SmoothTransformation);
|
||||
}
|
||||
}
|
||||
|
||||
return QSortFilterProxyModel::data(index, role);
|
||||
}
|
||||
|
||||
private:
|
||||
Core::Id m_platform;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user