Bugfix: GIF (8 bit indexed) icons could not be marked in package manager.

This commit is contained in:
Matthias Koefferlein 2018-05-17 22:38:17 +02:00
parent 1b607474b8
commit bb86970ac8
1 changed files with 4 additions and 0 deletions

View File

@ -200,6 +200,10 @@ SaltModel::data (const QModelIndex &index, int role) const
img = g->icon ();
}
if (img.format () != QImage::Format_ARGB32) {
img = img.convertToFormat (QImage::Format_ARGB32);
}
if (img.width () != icon_dim || img.height () != icon_dim) {
QImage scaled = img.scaled (QSize (icon_dim, icon_dim), Qt::KeepAspectRatio, Qt::SmoothTransformation);