From 7a295317397d5e49b66c39605c6529d99660691c Mon Sep 17 00:00:00 2001 From: q234rty Date: Tue, 28 Jun 2022 20:14:23 +0800 Subject: Fix blurriness of svg icons (#1108) --- src/ColorImageProvider.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/ColorImageProvider.cpp') diff --git a/src/ColorImageProvider.cpp b/src/ColorImageProvider.cpp index 74e9eff7..6a38c46c 100644 --- a/src/ColorImageProvider.cpp +++ b/src/ColorImageProvider.cpp @@ -5,10 +5,11 @@ #include "ColorImageProvider.h" +#include #include QPixmap -ColorImageProvider::requestPixmap(const QString &id, QSize *size, const QSize &) +ColorImageProvider::requestPixmap(const QString &id, QSize *size, const QSize &req) { auto args = id.split('?'); @@ -17,6 +18,8 @@ ColorImageProvider::requestPixmap(const QString &id, QSize *size, const QSize &) if (size) *size = QSize(source.width(), source.height()); + if (req.width() > 0 && req.height() > 0) + source = QIcon(args[0]).pixmap(req); if (args.size() < 2) return source; -- cgit 1.5.1