X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Fqtuiapplication.cpp;h=6777a567672e6ae8e97f3e4a5a2c6d211e8ae75a;hp=755a03261f170e0abd24cd8a29f7bafe41881721;hb=a113f73e5f8ce89c3df5c42d55528404fc7a2294;hpb=d2ac8f78a0e050d2efa397c434b249d6b3391576 diff --git a/src/qtui/qtuiapplication.cpp b/src/qtui/qtuiapplication.cpp index 755a0326..6777a567 100644 --- a/src/qtui/qtuiapplication.cpp +++ b/src/qtui/qtuiapplication.cpp @@ -145,12 +145,29 @@ bool QtUiApplication::init() return false; } + // Checking if settings Icon Theme is valid + QString savedIcontheme = QtUiSettings().value("IconTheme", QVariant("")).toString(); +#ifndef WITH_OXYGEN + if (savedIcontheme == "oxygen") + QtUiSettings().remove("IconTheme"); +#endif +#ifndef WITH_BREEZE + if (savedIcontheme == "breeze") + QtUiSettings().remove("IconTheme"); +#endif +#ifndef WITH_BREEZE_DARK + if (savedIcontheme == "breezedark") + QtUiSettings().remove("IconTheme"); +#endif + // Set the icon theme if (Quassel::isOptionSet("icontheme")) QIcon::setThemeName(Quassel::optionValue("icontheme")); + else if (QtUiSettings().value("IconTheme", QVariant("")).toString() != "") + QIcon::setThemeName(QtUiSettings().value("IconTheme").toString()); else if (QIcon::themeName().isEmpty()) - // Some platforms don't set a default icon theme; chances are we can find our bundled Oxygen theme though - QIcon::setThemeName("oxygen"); + // Some platforms don't set a default icon theme; chances are we can find our bundled theme though + QIcon::setThemeName("breeze"); // session resume QtUi *gui = new QtUi();