2016-10-21 08:07:26 +01:00
|
|
|
#include "DarkTheme.h"
|
|
|
|
|
2022-09-30 18:56:01 +01:00
|
|
|
#include <QObject>
|
|
|
|
|
2016-10-21 08:07:26 +01:00
|
|
|
QString DarkTheme::id()
|
|
|
|
{
|
2018-07-15 13:51:05 +01:00
|
|
|
return "dark";
|
2016-10-21 08:07:26 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
QString DarkTheme::name()
|
|
|
|
{
|
2018-07-15 13:51:05 +01:00
|
|
|
return QObject::tr("Dark");
|
2016-10-21 08:07:26 +01:00
|
|
|
}
|
|
|
|
|
2017-01-15 21:56:03 +00:00
|
|
|
bool DarkTheme::hasColorScheme()
|
|
|
|
{
|
2018-07-15 13:51:05 +01:00
|
|
|
return true;
|
2017-01-15 21:56:03 +00:00
|
|
|
}
|
|
|
|
|
2016-10-21 08:07:26 +01:00
|
|
|
QPalette DarkTheme::colorScheme()
|
|
|
|
{
|
2018-07-15 13:51:05 +01:00
|
|
|
QPalette darkPalette;
|
2023-08-02 17:35:35 +01:00
|
|
|
darkPalette.setColor(QPalette::Window, QColor(49, 49, 49));
|
2018-07-15 13:51:05 +01:00
|
|
|
darkPalette.setColor(QPalette::WindowText, Qt::white);
|
2023-08-02 17:35:35 +01:00
|
|
|
darkPalette.setColor(QPalette::Base, QColor(34, 34, 34));
|
|
|
|
darkPalette.setColor(QPalette::AlternateBase, QColor(42, 42, 42));
|
2018-07-15 13:51:05 +01:00
|
|
|
darkPalette.setColor(QPalette::ToolTipBase, Qt::white);
|
|
|
|
darkPalette.setColor(QPalette::ToolTipText, Qt::white);
|
|
|
|
darkPalette.setColor(QPalette::Text, Qt::white);
|
2023-08-02 17:35:35 +01:00
|
|
|
darkPalette.setColor(QPalette::Button, QColor(48, 48, 48));
|
2018-07-15 13:51:05 +01:00
|
|
|
darkPalette.setColor(QPalette::ButtonText, Qt::white);
|
|
|
|
darkPalette.setColor(QPalette::BrightText, Qt::red);
|
2023-08-02 17:35:35 +01:00
|
|
|
darkPalette.setColor(QPalette::Link, QColor(47, 163, 198));
|
|
|
|
darkPalette.setColor(QPalette::Highlight, QColor(150, 219, 89));
|
2018-07-15 13:51:05 +01:00
|
|
|
darkPalette.setColor(QPalette::HighlightedText, Qt::black);
|
2022-07-18 18:20:06 +01:00
|
|
|
darkPalette.setColor(QPalette::PlaceholderText, Qt::darkGray);
|
2023-08-02 17:35:35 +01:00
|
|
|
return fadeInactive(darkPalette, fadeAmount(), fadeColor());
|
2016-10-21 08:07:26 +01:00
|
|
|
}
|
|
|
|
|
2016-11-06 03:29:12 +00:00
|
|
|
double DarkTheme::fadeAmount()
|
|
|
|
{
|
2018-07-15 13:51:05 +01:00
|
|
|
return 0.5;
|
2016-11-06 03:29:12 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
QColor DarkTheme::fadeColor()
|
|
|
|
{
|
2023-08-02 17:35:35 +01:00
|
|
|
return QColor(49, 49, 49);
|
2016-11-06 03:29:12 +00:00
|
|
|
}
|
2016-10-21 08:07:26 +01:00
|
|
|
|
2017-01-15 21:56:03 +00:00
|
|
|
bool DarkTheme::hasStyleSheet()
|
|
|
|
{
|
2018-07-15 13:51:05 +01:00
|
|
|
return true;
|
2017-01-15 21:56:03 +00:00
|
|
|
}
|
|
|
|
|
2016-10-21 08:07:26 +01:00
|
|
|
QString DarkTheme::appStyleSheet()
|
|
|
|
{
|
2018-07-15 13:51:05 +01:00
|
|
|
return "QToolTip { color: #ffffff; background-color: #2a82da; border: 1px solid white; }";
|
2016-10-21 08:07:26 +01:00
|
|
|
}
|