mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2024-11-26 07:35:41 +00:00
Qt: Add Classic Windows as theme option
But it'll bug out when switching between windows11/windowsvista. Restart to fix.
This commit is contained in:
parent
6a02f9c67b
commit
645adad932
|
@ -11,6 +11,9 @@
|
|||
|
||||
const char* InterfaceSettingsWidget::THEME_NAMES[] = {
|
||||
QT_TRANSLATE_NOOP("MainWindow", "Native"),
|
||||
#ifdef _WIN32
|
||||
QT_TRANSLATE_NOOP("MainWindow", "Classic Windows"),
|
||||
#endif
|
||||
QT_TRANSLATE_NOOP("MainWindow", "Fusion"),
|
||||
QT_TRANSLATE_NOOP("MainWindow", "Dark Fusion (Gray)"),
|
||||
QT_TRANSLATE_NOOP("MainWindow", "Dark Fusion (Blue)"),
|
||||
|
@ -22,7 +25,18 @@ const char* InterfaceSettingsWidget::THEME_NAMES[] = {
|
|||
};
|
||||
|
||||
const char* InterfaceSettingsWidget::THEME_VALUES[] = {
|
||||
"","fusion", "darkfusion", "darkfusionblue", "cobaltsky", "greymatter", "darkruby", "purplerain", nullptr,
|
||||
"",
|
||||
#ifdef _WIN32
|
||||
"windowsvista",
|
||||
#endif
|
||||
"fusion",
|
||||
"darkfusion",
|
||||
"darkfusionblue",
|
||||
"cobaltsky",
|
||||
"greymatter",
|
||||
"darkruby",
|
||||
"purplerain",
|
||||
nullptr,
|
||||
};
|
||||
|
||||
const char* InterfaceSettingsWidget::DEFAULT_THEME_NAME = "darkfusion";
|
||||
|
|
|
@ -2428,6 +2428,13 @@ void MainWindow::setStyleFromSettings()
|
|||
|
||||
qApp->setStyleSheet("QToolTip { color: #ffffff; background-color: #505a70; border: 1px solid white; }");
|
||||
}
|
||||
#ifdef _WIN32
|
||||
else if (theme == "windowsvista")
|
||||
{
|
||||
qApp->setStyle(QStyleFactory::create("windowsvista"));
|
||||
qApp->setStyleSheet(QString());
|
||||
}
|
||||
#endif
|
||||
else
|
||||
{
|
||||
qApp->setStyle(s_unthemed_style_name);
|
||||
|
|
Loading…
Reference in a new issue