diff --git a/src/gui/guiiconprovider.cpp b/src/gui/guiiconprovider.cpp index ae968115f..55e71194f 100644 --- a/src/gui/guiiconprovider.cpp +++ b/src/gui/guiiconprovider.cpp @@ -57,10 +57,17 @@ GuiIconProvider *GuiIconProvider::instance() } QIcon GuiIconProvider::getIcon(const QString &iconId) +{ + return getIcon(iconId, iconId); +} + +QIcon GuiIconProvider::getIcon(const QString &iconId, const QString &fallback) { #if (defined(Q_OS_UNIX) && !defined(Q_OS_MAC)) if (m_useSystemTheme) { - QIcon icon = QIcon::fromTheme(iconId, QIcon(IconProvider::getIconPath(iconId))); + QIcon icon = QIcon::fromTheme(iconId); + if (icon.name() != iconId) + icon = QIcon::fromTheme(fallback, QIcon(IconProvider::getIconPath(iconId))); icon = generateDifferentSizes(icon); return icon; } diff --git a/src/gui/guiiconprovider.h b/src/gui/guiiconprovider.h index 2b6ad07d5..665a7fabe 100644 --- a/src/gui/guiiconprovider.h +++ b/src/gui/guiiconprovider.h @@ -44,6 +44,7 @@ public: static GuiIconProvider *instance(); QIcon getIcon(const QString &iconId); + QIcon getIcon(const QString &iconId, const QString &fallback); QIcon getFlagIcon(const QString &countryIsoCode); QString getIconPath(const QString &iconId);