┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/kitemviews/private
diff options
context:
space:
mode:
authorConway <[email protected]>2026-01-24 12:20:08 -0500
committerConway <[email protected]>2026-03-09 13:44:11 -0400
commitc8ecdb45dde6f850a8eaefc661528dd2d43677a3 (patch)
treeb273fe0608967380cc09eb3cc0a371daf93cb176 /src/kitemviews/private
parent4a7be9f25332942b071e7a1659a7aed67236cfb8 (diff)
Adds options for pixel scaling and filename extensionspixelated-scaling-option
Diffstat (limited to 'src/kitemviews/private')
-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);
}