diff options
author | Alessandro Portale <alessandro.portale@qt.io> | 2023-05-02 18:28:12 +0200 |
---|---|---|
committer | Alessandro Portale <alessandro.portale@qt.io> | 2023-05-03 19:55:22 +0000 |
commit | 765e8a65eaeb2ec01cd87970a44fd84bab08d59a (patch) | |
tree | 7d090581e457f5cc62414648b0592e3d980c4659 /src/plugins/qtsupport/exampleslistmodel.cpp | |
parent | 2a5f2961a75bd26acadc9ab514a8875d9eaade4c (diff) |
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>
Diffstat (limited to 'src/plugins/qtsupport/exampleslistmodel.cpp')
-rw-r--r-- | src/plugins/qtsupport/exampleslistmodel.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/qtsupport/exampleslistmodel.cpp b/src/plugins/qtsupport/exampleslistmodel.cpp index 3478634815..ebb90381c7 100644 --- a/src/plugins/qtsupport/exampleslistmodel.cpp +++ b/src/plugins/qtsupport/exampleslistmodel.cpp @@ -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); |