diff options
author | q234rty <q23456yuiop@gmail.com> | 2022-06-28 20:14:23 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-28 12:14:23 +0000 |
commit | 7a295317397d5e49b66c39605c6529d99660691c (patch) | |
tree | 5039c4f69d6d68a879b7138a75fd2b7205fc84f1 /src/ColorImageProvider.cpp | |
parent | Fix clazy complaint about detatch (diff) | |
download | nheko-7a295317397d5e49b66c39605c6529d99660691c.tar.xz |
Fix blurriness of svg icons (#1108)
Diffstat (limited to 'src/ColorImageProvider.cpp')
-rw-r--r-- | src/ColorImageProvider.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
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 <QIcon> #include <QPainter> 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; |