diff options
| author | Conway <[email protected]> | 2026-05-01 10:25:05 -0400 |
|---|---|---|
| committer | Conway <[email protected]> | 2026-05-01 10:25:05 -0400 |
| commit | 41d6039c918b6158d833fecbeffd218d9eb102fc (patch) | |
| tree | 84e6970cfbac7736ef3be36a6c84b6d1ae8e6402 /src/kitemviews/private/kpixmapmodifier.cpp | |
| parent | 4139e59154bde18667dc27155afb922cda4c28c4 (diff) | |
Adds options for pixel scaling and filename extensions
Diffstat (limited to 'src/kitemviews/private/kpixmapmodifier.cpp')
| -rw-r--r-- | src/kitemviews/private/kpixmapmodifier.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/kitemviews/private/kpixmapmodifier.cpp b/src/kitemviews/private/kpixmapmodifier.cpp index bf316b880..96aea26d4 100644 --- a/src/kitemviews/private/kpixmapmodifier.cpp +++ b/src/kitemviews/private/kpixmapmodifier.cpp @@ -15,6 +15,8 @@ #include "kpixmapmodifier.h" +#include "dolphin_iconsmodesettings.h" + #include <QGuiApplication> #include <QImage> #include <QPainter> @@ -281,7 +283,10 @@ void KPixmapModifier::scale(QPixmap &pixmap, const QSize &scaledSize) return; } qreal dpr = pixmap.devicePixelRatio(); - pixmap = pixmap.scaled(scaledSize, Qt::KeepAspectRatio, Qt::SmoothTransformation); + const Qt::TransformationMode mode = IconsModeSettings::usePixelatedScaling() + ? Qt::FastTransformation + : Qt::SmoothTransformation; + pixmap = pixmap.scaled(scaledSize, Qt::KeepAspectRatio, mode); pixmap.setDevicePixelRatio(dpr); } |
