Support fractional scaling when scaling card images (#4962)
Fixes #4880
This commit is contained in:
parent
78a928464c
commit
cb18a55338
1 changed files with 1 additions and 1 deletions
|
@ -621,7 +621,7 @@ void PictureLoader::getPixmap(QPixmap &pixmap, CardInfoPtr card, QSize size)
|
||||||
QPixmap bigPixmap;
|
QPixmap bigPixmap;
|
||||||
if (QPixmapCache::find(key, &bigPixmap)) {
|
if (QPixmapCache::find(key, &bigPixmap)) {
|
||||||
QScreen *screen = qApp->primaryScreen();
|
QScreen *screen = qApp->primaryScreen();
|
||||||
int dpr = screen->devicePixelRatio();
|
qreal dpr = screen->devicePixelRatio();
|
||||||
pixmap = bigPixmap.scaled(size * dpr, Qt::KeepAspectRatio, Qt::SmoothTransformation);
|
pixmap = bigPixmap.scaled(size * dpr, Qt::KeepAspectRatio, Qt::SmoothTransformation);
|
||||||
pixmap.setDevicePixelRatio(dpr);
|
pixmap.setDevicePixelRatio(dpr);
|
||||||
QPixmapCache::insert(sizeKey, pixmap);
|
QPixmapCache::insert(sizeKey, pixmap);
|
||||||
|
|
Loading…
Reference in a new issue