mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2024-11-26 15:45:42 +00:00
Add Theme - Ruby
This PR adds the Ruby Dark theme from PCSX2 to Duckstation Thanks @KamFretoZ for the heads up, Credits custom palette @Daisouji
This commit is contained in:
parent
9211d9f2e3
commit
5054d46075
|
@ -15,12 +15,13 @@ const char* InterfaceSettingsWidget::THEME_NAMES[] = {
|
|||
QT_TRANSLATE_NOOP("MainWindow", "Dark Fusion (Gray)"),
|
||||
QT_TRANSLATE_NOOP("MainWindow", "Dark Fusion (Blue)"),
|
||||
QT_TRANSLATE_NOOP("MainWindow", "Grey Matter"),
|
||||
QT_TRANSLATE_NOOP("MainWindow", "Dark Ruby"),
|
||||
QT_TRANSLATE_NOOP("MainWindow", "QDarkStyle"),
|
||||
nullptr,
|
||||
};
|
||||
|
||||
const char* InterfaceSettingsWidget::THEME_VALUES[] = {
|
||||
"", "fusion", "darkfusion", "darkfusionblue", "greymatter", "qdarkstyle", nullptr,
|
||||
"", "fusion", "darkfusion", "darkfusionblue", "greymatter", "darkruby", "qdarkstyle", nullptr,
|
||||
};
|
||||
|
||||
const char* InterfaceSettingsWidget::DEFAULT_THEME_NAME = "darkfusion";
|
||||
|
|
|
@ -2343,6 +2343,38 @@ void MainWindow::setStyleFromSettings()
|
|||
|
||||
qApp->setStyleSheet("QToolTip { color: #ffffff; background-color: #505a70; border: 1px solid white; }");
|
||||
}
|
||||
else if (theme == "darkruby")
|
||||
{
|
||||
qApp->setStyle(QStyleFactory::create("Fusion"));
|
||||
|
||||
const QColor gray(128, 128, 128);
|
||||
const QColor slate(18, 18, 18);
|
||||
const QColor rubyish(172, 21, 31);
|
||||
|
||||
QPalette darkPalette;
|
||||
darkPalette.setColor(QPalette::Window, slate);
|
||||
darkPalette.setColor(QPalette::WindowText, Qt::white);
|
||||
darkPalette.setColor(QPalette::Base, slate.lighter());
|
||||
darkPalette.setColor(QPalette::AlternateBase, slate.lighter());
|
||||
darkPalette.setColor(QPalette::ToolTipBase, slate);
|
||||
darkPalette.setColor(QPalette::ToolTipText, Qt::white);
|
||||
darkPalette.setColor(QPalette::Text, Qt::white);
|
||||
darkPalette.setColor(QPalette::Button, slate);
|
||||
darkPalette.setColor(QPalette::ButtonText, Qt::white);
|
||||
darkPalette.setColor(QPalette::Link, Qt::white);
|
||||
darkPalette.setColor(QPalette::Highlight, rubyish);
|
||||
darkPalette.setColor(QPalette::HighlightedText, Qt::white);
|
||||
|
||||
darkPalette.setColor(QPalette::Active, QPalette::Button, slate);
|
||||
darkPalette.setColor(QPalette::Disabled, QPalette::ButtonText, gray);
|
||||
darkPalette.setColor(QPalette::Disabled, QPalette::WindowText, gray);
|
||||
darkPalette.setColor(QPalette::Disabled, QPalette::Text, gray);
|
||||
darkPalette.setColor(QPalette::Disabled, QPalette::Light, slate.lighter());
|
||||
|
||||
qApp->setPalette(darkPalette);
|
||||
|
||||
qApp->setStyleSheet("QToolTip { color: #ffffff; background-color: #2a82da; border: 1px solid white; }");
|
||||
}
|
||||
else
|
||||
{
|
||||
qApp->setStyle(s_unthemed_style_name);
|
||||
|
|
Loading…
Reference in a new issue