mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-09-29 20:38:03 -05:00
Support fractional scaling when scaling card images (#4962)
Fixes #4880
This commit is contained in:
@@ -621,7 +621,7 @@ void PictureLoader::getPixmap(QPixmap &pixmap, CardInfoPtr card, QSize size)
|
||||
QPixmap bigPixmap;
|
||||
if (QPixmapCache::find(key, &bigPixmap)) {
|
||||
QScreen *screen = qApp->primaryScreen();
|
||||
int dpr = screen->devicePixelRatio();
|
||||
qreal dpr = screen->devicePixelRatio();
|
||||
pixmap = bigPixmap.scaled(size * dpr, Qt::KeepAspectRatio, Qt::SmoothTransformation);
|
||||
pixmap.setDevicePixelRatio(dpr);
|
||||
QPixmapCache::insert(sizeKey, pixmap);
|
||||
|
||||
Reference in New Issue
Block a user