configure icon/skin themes early in startup (#611)

After changing the icon theme some of the icons were still from my
current system (Gentoo/KDE) icon theme. Moving the theme setup
earlier in the startup fixed it.
This commit is contained in:
igrekster 2022-01-28 01:47:23 +11:00 committed by GitHub
parent ace6b7fd9e
commit 5a5b697fbe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 6 deletions

View File

@ -81,6 +81,12 @@ Application::Application(const QString& id, int& argc, char** argv)
//: Name of translator - optional. //: Name of translator - optional.
QObject::tr("LANG_AUTHOR"); QObject::tr("LANG_AUTHOR");
// Add an extra path for non-system icon themes and set current icon theme
// and skin.
m_icons->setupSearchPaths();
m_icons->loadCurrentIconTheme();
m_skins->loadCurrentSkin();
connect(this, &Application::aboutToQuit, this, &Application::onAboutToQuit); connect(this, &Application::aboutToQuit, this, &Application::onAboutToQuit);
connect(this, &Application::commitDataRequest, this, &Application::onCommitData); connect(this, &Application::commitDataRequest, this, &Application::onCommitData);
connect(this, &Application::saveStateRequest, this, &Application::onSaveState); connect(this, &Application::saveStateRequest, this, &Application::onSaveState);

View File

@ -74,12 +74,6 @@ int main(int argc, char* argv[]) {
qRegisterMetaType<QList<Label*>>("QList<Label*>"); qRegisterMetaType<QList<Label*>>("QList<Label*>");
qRegisterMetaType<Label*>("Label*"); qRegisterMetaType<Label*>("Label*");
// Add an extra path for non-system icon themes and set current icon theme
// and skin.
qApp->icons()->setupSearchPaths();
qApp->icons()->loadCurrentIconTheme();
qApp->skins()->loadCurrentSkin();
// These settings needs to be set before any QSettings object. // These settings needs to be set before any QSettings object.
Application::setApplicationName(QSL(APP_NAME)); Application::setApplicationName(QSL(APP_NAME));
Application::setApplicationVersion(QSL(APP_VERSION)); Application::setApplicationVersion(QSL(APP_VERSION));