1
0
Fork 0

Launcher smoothly scales thumbnails.

Was accidentally using nearest, not linear, interpolation when
resizing thumbnails. Very pixels. Much ugly.
This commit is contained in:
James Turner 2017-01-17 22:18:35 +00:00
parent 404fad4254
commit 8472a8c38a

View file

@ -153,7 +153,7 @@ QPixmap AircraftItem::thumbnail(bool loadIfRequired) const
m_thumbnail.load(dir.filePath("thumbnail.jpg"));
// resize to the standard size
if (m_thumbnail.height() > STANDARD_THUMBNAIL_HEIGHT) {
m_thumbnail = m_thumbnail.scaledToHeight(STANDARD_THUMBNAIL_HEIGHT);
m_thumbnail = m_thumbnail.scaledToHeight(STANDARD_THUMBNAIL_HEIGHT, Qt::SmoothTransformation);
}
}
}
@ -400,7 +400,7 @@ protected:
QPixmap pix = QPixmap::fromImage(img);
if (pix.height() > STANDARD_THUMBNAIL_HEIGHT) {
pix = pix.scaledToHeight(STANDARD_THUMBNAIL_HEIGHT);
pix = pix.scaledToHeight(STANDARD_THUMBNAIL_HEIGHT, Qt::SmoothTransformation);
}
m_model->m_thumbnailPixmapCache.insert(QString::fromStdString(aThumbnailUrl), pix);