forked from qt-creator/qt-creator
Examples: Centralize constants in one place
Having all constants in WelcomePageHelpers makes reading the welcome scren code a bit less interesting. Change-Id: Idc2e402f33042b49d041c43ecc78a6e8d2d3536a Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
@@ -255,7 +255,8 @@ static QPixmap fetchPixmapAndUpdatePixmapCache(const QString &url)
|
||||
img.convertTo(QImage::Format_RGB32);
|
||||
const int dpr = qApp->devicePixelRatio();
|
||||
// boundedTo -> don't scale thumbnails up
|
||||
const QSize scaledSize = Core::ListModel::defaultImageSize.boundedTo(img.size()) * dpr;
|
||||
const QSize scaledSize =
|
||||
WelcomePageHelpers::GridItemImageSize.boundedTo(img.size()) * dpr;
|
||||
pixmap = QPixmap::fromImage(
|
||||
img.scaled(scaledSize, Qt::KeepAspectRatio, Qt::SmoothTransformation));
|
||||
pixmap.setDevicePixelRatio(dpr);
|
||||
|
||||
Reference in New Issue
Block a user