diff options
Diffstat (limited to 'src/kitemviews')
| -rw-r--r-- | src/kitemviews/private/kpixmapmodifier.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/kitemviews/private/kpixmapmodifier.cpp b/src/kitemviews/private/kpixmapmodifier.cpp index c564ecc30..ee1f84366 100644 --- a/src/kitemviews/private/kpixmapmodifier.cpp +++ b/src/kitemviews/private/kpixmapmodifier.cpp @@ -347,6 +347,7 @@ void KPixmapModifier::scale(QPixmap& pixmap, const QSize& scaledSize) }}; QPixmap scaledPixmap(scaledPixmapSize); + scaledPixmap.setDevicePixelRatio(pixmap.devicePixelRatio()); scaledPixmap.fill(Qt::transparent); Display* dpy = QX11Info::display(); @@ -364,7 +365,9 @@ void KPixmapModifier::scale(QPixmap& pixmap, const QSize& scaledSize) pixmap = pixmap.scaled(scaledSize, Qt::KeepAspectRatio, Qt::SmoothTransformation); } #else + qreal dpr = pixmap.devicePixelRatio(); pixmap = pixmap.scaled(scaledSize, Qt::KeepAspectRatio, Qt::SmoothTransformation); + pixmap.setDevicePixelRatio(dpr); #endif } |
