From e1949c8628133e9d60f4c7cb23a91f1235be7fcc Mon Sep 17 00:00:00 2001 From: Martin Rotter Date: Mon, 20 Apr 2020 09:18:33 +0200 Subject: [PATCH] Enhancements to icon theme, defaults on linux to default icon theme. --- src/librssguard/miscellaneous/iconfactory.cpp | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/librssguard/miscellaneous/iconfactory.cpp b/src/librssguard/miscellaneous/iconfactory.cpp index d980ecce9..fbd0e8df2 100755 --- a/src/librssguard/miscellaneous/iconfactory.cpp +++ b/src/librssguard/miscellaneous/iconfactory.cpp @@ -80,8 +80,18 @@ void IconFactory::loadCurrentIconTheme() { if (installed_themes.contains(theme_name_from_settings)) { // Desired icon theme is installed and can be loaded. +#if defined(Q_OS_LINUX) + if (theme_name_from_settings.isEmpty()) { + qDebug("Loading default system icon theme."); + } + else { + qDebug("Loading icon theme '%s'.", qPrintable(theme_name_from_settings)); + QIcon::setThemeName(theme_name_from_settings); + } +#else qDebug("Loading icon theme '%s'.", qPrintable(theme_name_from_settings)); QIcon::setThemeName(theme_name_from_settings); +#endif } else { // Desired icon theme is not currently available. @@ -98,11 +108,7 @@ void IconFactory::loadCurrentIconTheme() { } QStringList IconFactory::installedIconThemes() const { - QStringList icon_theme_names; - -#if !defined(Q_OS_LINUX) - icon_theme_names << APP_NO_THEME; -#endif + QStringList icon_theme_names; icon_theme_names << APP_NO_THEME; // Iterate all directories with icon themes. QStringList icon_themes_paths = QIcon::themeSearchPaths();