diff options
author | Nicolas Werner <nicolas.werner@hotmail.de> | 2023-06-02 02:51:37 +0200 |
---|---|---|
committer | Nicolas Werner <nicolas.werner@hotmail.de> | 2023-06-08 22:32:09 +0200 |
commit | e09188c4d08e46bd51aac21701f97ddcd6e0629a (patch) | |
tree | 2536dc45385ce5ce28173a3ef919af39dea69302 /src/UserSettingsPage.cpp | |
parent | 8e61596d157880b4b7b96518c33faf947370d8aa (diff) |
Remove style sheets
Diffstat (limited to 'src/UserSettingsPage.cpp')
-rw-r--r-- | src/UserSettingsPage.cpp | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/src/UserSettingsPage.cpp b/src/UserSettingsPage.cpp index 7e7cead3..84453962 100644 --- a/src/UserSettingsPage.cpp +++ b/src/UserSettingsPage.cpp @@ -852,21 +852,8 @@ UserSettings::setOpenVideoExternal(bool state) void UserSettings::applyTheme() { - QFile stylefile; - - if (this->theme() == QLatin1String("light")) { - stylefile.setFileName(QStringLiteral(":/styles/styles/nheko.qss")); - } else if (this->theme() == QLatin1String("dark")) { - stylefile.setFileName(QStringLiteral(":/styles/styles/nheko-dark.qss")); - } else { - stylefile.setFileName(QStringLiteral(":/styles/styles/system.qss")); - } - QApplication::setPalette(Theme::paletteFromTheme(this->theme())); - - stylefile.open(QFile::ReadOnly); - QString stylesheet = QString(stylefile.readAll()); - - qobject_cast<QApplication *>(QApplication::instance())->setStyleSheet(stylesheet); + QGuiApplication::setPalette(Theme::paletteFromTheme(this->theme())); + QApplication::setPalette(Theme::paletteFromTheme(this->theme())); } void |