mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2025-04-29 22:24:26 +02:00
Default to Fusion based Dark/Bright themes on Windows
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
This commit is contained in:
parent
0af021fef2
commit
5261b615d7
@ -154,6 +154,7 @@
|
||||
|
||||
#if defined Q_OS_WIN32
|
||||
#include <windows.h>
|
||||
#include <QStyleHints>
|
||||
#include "WindowsConsole.h"
|
||||
#endif
|
||||
|
||||
@ -1109,8 +1110,16 @@ bool Application::createSetupWizard()
|
||||
// set default theme after going into theme wizard
|
||||
if (!validIcons)
|
||||
settings()->set("IconTheme", QString("pe_colored"));
|
||||
if (!validWidgets)
|
||||
settings()->set("ApplicationTheme", QString("system"));
|
||||
if (!validWidgets) {
|
||||
#if defined(Q_OS_WIN32) && QT_VERSION >= QT_VERSION_CHECK(6, 5, 0)
|
||||
const QString style =
|
||||
QGuiApplication::styleHints()->colorScheme() == Qt::ColorScheme::Dark ? QStringLiteral("dark") : QStringLiteral("bright");
|
||||
#else
|
||||
const QString style = QStringLiteral("system");
|
||||
#endif
|
||||
|
||||
settings()->set("ApplicationTheme", style);
|
||||
}
|
||||
|
||||
m_themeManager->applyCurrentlySelectedTheme(true);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user