Qt: Add AMOLED theme (#3374)
This commit is contained in:
parent
78bd0fdf3e
commit
6a0c73b547
|
@ -19,6 +19,7 @@ const char* InterfaceSettingsWidget::THEME_NAMES[] = {
|
|||
QT_TRANSLATE_NOOP("MainWindow", "Dark Fusion (Blue)"),
|
||||
QT_TRANSLATE_NOOP("MainWindow", "Cobalt Sky"),
|
||||
QT_TRANSLATE_NOOP("MainWindow", "Grey Matter"),
|
||||
QT_TRANSLATE_NOOP("MainWindow", "AMOLED"),
|
||||
QT_TRANSLATE_NOOP("MainWindow", "Dark Ruby"),
|
||||
QT_TRANSLATE_NOOP("MainWindow", "Purple Rain"),
|
||||
QT_TRANSLATE_NOOP("MainWindow", "QDarkStyle"),
|
||||
|
@ -35,6 +36,7 @@ const char* InterfaceSettingsWidget::THEME_VALUES[] = {
|
|||
"darkfusionblue",
|
||||
"cobaltsky",
|
||||
"greymatter",
|
||||
"AMOLED",
|
||||
"darkruby",
|
||||
"purplerain",
|
||||
"qdarkstyle",
|
||||
|
|
|
@ -199,6 +199,42 @@ void QtHost::SetStyleFromSettings()
|
|||
qApp->setPalette(darkPalette);
|
||||
qApp->setStyleSheet(QString());
|
||||
}
|
||||
else if (theme == "AMOLED")
|
||||
{
|
||||
// Custom palette by KamFretoZ, A pure concentrated darkness
|
||||
// of a theme designed for maximum eye comfort and benefits
|
||||
// OLED screens.
|
||||
qApp->setStyle(QStyleFactory::create("Fusion"));
|
||||
|
||||
const QColor black(0, 0, 0);
|
||||
const QColor gray(25, 25, 25);
|
||||
const QColor lighterGray(75, 75, 75);
|
||||
const QColor blue(198, 238, 255);
|
||||
|
||||
QPalette AMOLEDPalette;
|
||||
AMOLEDPalette.setColor(QPalette::Window, black);
|
||||
AMOLEDPalette.setColor(QPalette::WindowText, Qt::white);
|
||||
AMOLEDPalette.setColor(QPalette::Base, gray);
|
||||
AMOLEDPalette.setColor(QPalette::AlternateBase, black);
|
||||
AMOLEDPalette.setColor(QPalette::ToolTipBase, gray);
|
||||
AMOLEDPalette.setColor(QPalette::ToolTipText, Qt::white);
|
||||
AMOLEDPalette.setColor(QPalette::Text, Qt::white);
|
||||
AMOLEDPalette.setColor(QPalette::Button, gray);
|
||||
AMOLEDPalette.setColor(QPalette::ButtonText, Qt::white);
|
||||
AMOLEDPalette.setColor(QPalette::Link, blue);
|
||||
AMOLEDPalette.setColor(QPalette::Highlight, lighterGray);
|
||||
AMOLEDPalette.setColor(QPalette::HighlightedText, Qt::white);
|
||||
AMOLEDPalette.setColor(QPalette::PlaceholderText, QColor(Qt::white).darker());
|
||||
|
||||
AMOLEDPalette.setColor(QPalette::Active, QPalette::Button, gray);
|
||||
AMOLEDPalette.setColor(QPalette::Disabled, QPalette::ButtonText, QColor(Qt::white).darker());
|
||||
AMOLEDPalette.setColor(QPalette::Disabled, QPalette::WindowText, QColor(Qt::white).darker());
|
||||
AMOLEDPalette.setColor(QPalette::Disabled, QPalette::Text, QColor(Qt::white).darker());
|
||||
AMOLEDPalette.setColor(QPalette::Disabled, QPalette::Light, QColor(Qt::white).darker());
|
||||
|
||||
qApp->setPalette(AMOLEDPalette);
|
||||
qApp->setStyleSheet(QString());
|
||||
}
|
||||
else if (theme == "darkruby")
|
||||
{
|
||||
qApp->setStyle(QStyleFactory::create("Fusion"));
|
||||
|
|
Loading…
Reference in New Issue