diff --git a/src/gui/guiiconprovider.cpp b/src/gui/guiiconprovider.cpp index 55e71194f..2a7ab9cd9 100644 --- a/src/gui/guiiconprovider.cpp +++ b/src/gui/guiiconprovider.cpp @@ -88,6 +88,13 @@ QIcon GuiIconProvider::getFlagIcon(const QString &countryIsoCode) #if (defined(Q_OS_UNIX) && !defined(Q_OS_MAC)) QIcon GuiIconProvider::generateDifferentSizes(const QIcon &icon) { + // if icon is loaded from SVG format, it already contains all the required sizes and we shall not resize it + // In that case it will be available in the following sizes: + // (QSize(16, 16), QSize(22, 22), QSize(32, 32), QSize(48, 48), QSize(64, 64), QSize(128, 128), QSize(256, 256)) + + if (icon.availableSizes(QIcon::Normal, QIcon::On).size() > 6) + return icon; + QIcon newIcon; QList requiredSizes; requiredSizes << QSize(16, 16) << QSize(24, 24) << QSize(32, 32);