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 | |
parent | Fix message height (diff) | |
download | nheko-e09188c4d08e46bd51aac21701f97ddcd6e0629a.tar.xz |
Remove style sheets
Diffstat (limited to 'src')
-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 |