┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/kitemviews/private/kpixmapmodifier.cpp
diff options
context:
space:
mode:
authorConway <[email protected]>2026-05-01 10:25:05 -0400
committerConway <[email protected]>2026-07-08 18:18:56 -0400
commit434ea40eb6bb37be776649fa220b9b080198efe2 (patch)
tree4cbb5dc30e7470e91c2977e007370f752cf90ced /src/kitemviews/private/kpixmapmodifier.cpp
parentefb2747d81030a697cf7bd29bc66bf7b52512e71 (diff)
Adds options for pixel scaling and filename extensions
Diffstat (limited to 'src/kitemviews/private/kpixmapmodifier.cpp')
-rw-r--r--src/kitemviews/private/kpixmapmodifier.cpp7
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);
}