Enhancements to icon theme, defaults on linux to default icon theme.
This commit is contained in:
parent
1d862fdd2b
commit
e1949c8628
@ -80,9 +80,19 @@ void IconFactory::loadCurrentIconTheme() {
|
|||||||
|
|
||||||
if (installed_themes.contains(theme_name_from_settings)) {
|
if (installed_themes.contains(theme_name_from_settings)) {
|
||||||
// Desired icon theme is installed and can be loaded.
|
// 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));
|
qDebug("Loading icon theme '%s'.", qPrintable(theme_name_from_settings));
|
||||||
QIcon::setThemeName(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 {
|
else {
|
||||||
// Desired icon theme is not currently available.
|
// Desired icon theme is not currently available.
|
||||||
// Activate "default" or "no" icon theme instead.
|
// Activate "default" or "no" icon theme instead.
|
||||||
@ -98,11 +108,7 @@ void IconFactory::loadCurrentIconTheme() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
QStringList IconFactory::installedIconThemes() const {
|
QStringList IconFactory::installedIconThemes() const {
|
||||||
QStringList icon_theme_names;
|
QStringList icon_theme_names; icon_theme_names << APP_NO_THEME;
|
||||||
|
|
||||||
#if !defined(Q_OS_LINUX)
|
|
||||||
icon_theme_names << APP_NO_THEME;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Iterate all directories with icon themes.
|
// Iterate all directories with icon themes.
|
||||||
QStringList icon_themes_paths = QIcon::themeSearchPaths();
|
QStringList icon_themes_paths = QIcon::themeSearchPaths();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user