summary refs log tree commit diff
path: root/src/ui/Theme.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/Theme.cpp')
-rw-r--r--src/ui/Theme.cpp68
1 files changed, 34 insertions, 34 deletions
diff --git a/src/ui/Theme.cpp b/src/ui/Theme.cpp

index d7c92fb8..318f93c1 100644 --- a/src/ui/Theme.cpp +++ b/src/ui/Theme.cpp
@@ -13,41 +13,41 @@ Theme::paletteFromTheme(std::string_view theme) static QPalette original; if (theme == "light") { QPalette lightActive( - /*windowText*/ QColor("#333"), - /*button*/ QColor("white"), + /*windowText*/ QColor(0x33, 0x33, 0x33), + /*button*/ QColor(Qt::GlobalColor::white), /*light*/ QColor(0xef, 0xef, 0xef), /*dark*/ QColor(70, 77, 93), /*mid*/ QColor(220, 220, 220), - /*text*/ QColor("#333"), - /*bright_text*/ QColor("#f2f5f8"), - /*base*/ QColor("#fff"), - /*window*/ QColor("white")); - lightActive.setColor(QPalette::AlternateBase, QColor("#eee")); - lightActive.setColor(QPalette::Highlight, QColor("#38a3d8")); - lightActive.setColor(QPalette::HighlightedText, QColor("#f4f4f5")); + /*text*/ QColor(0x33, 0x33, 0x33), + /*bright_text*/ QColor(0xf2, 0xf5, 0xf8), + /*base*/ QColor(Qt::GlobalColor::white), + /*window*/ QColor(Qt::GlobalColor::white)); + lightActive.setColor(QPalette::AlternateBase, QColor(0xee, 0xee, 0xee)); + lightActive.setColor(QPalette::Highlight, QColor(0x38, 0xa3, 0xd8)); + lightActive.setColor(QPalette::HighlightedText, QColor(0xf4, 0xf4, 0xf5)); lightActive.setColor(QPalette::ToolTipBase, lightActive.base().color()); lightActive.setColor(QPalette::ToolTipText, lightActive.text().color()); - lightActive.setColor(QPalette::Link, QColor("#0077b5")); - lightActive.setColor(QPalette::ButtonText, QColor("#555459")); + lightActive.setColor(QPalette::Link, QColor(0x00, 0x77, 0xb5)); + lightActive.setColor(QPalette::ButtonText, QColor(0x55, 0x54, 0x59)); return lightActive; } else if (theme == "dark") { QPalette darkActive( - /*windowText*/ QColor("#caccd1"), - /*button*/ QColor(0xff, 0xff, 0xff), - /*light*/ QColor("#caccd1"), + /*windowText*/ QColor(0xca, 0xcc, 0xd1), + /*button*/ QColor(Qt::GlobalColor::white), + /*light*/ QColor(0xca, 0xcc, 0xd1), /*dark*/ QColor(60, 70, 77), - /*mid*/ QColor("#202228"), - /*text*/ QColor("#caccd1"), - /*bright_text*/ QColor("#f4f5f8"), - /*base*/ QColor("#202228"), - /*window*/ QColor("#2d3139")); - darkActive.setColor(QPalette::AlternateBase, QColor("#2d3139")); - darkActive.setColor(QPalette::Highlight, QColor("#38a3d8")); - darkActive.setColor(QPalette::HighlightedText, QColor("#f4f5f8")); + /*mid*/ QColor(0x20, 0x22, 0x28), + /*text*/ QColor(0xca, 0xcc, 0xd1), + /*bright_text*/ QColor(0xf4, 0xf5, 0xf8), + /*base*/ QColor(0x20, 0x22, 0x28), + /*window*/ QColor(0x2d, 0x31, 0x39)); + darkActive.setColor(QPalette::AlternateBase, QColor(0x2d, 0x31, 0x39)); + darkActive.setColor(QPalette::Highlight, QColor(0x38, 0xa3, 0xd8)); + darkActive.setColor(QPalette::HighlightedText, QColor(0xf4, 0xf5, 0xf8)); darkActive.setColor(QPalette::ToolTipBase, darkActive.base().color()); darkActive.setColor(QPalette::ToolTipText, darkActive.text().color()); - darkActive.setColor(QPalette::Link, QColor("#38a3d8")); - darkActive.setColor(QPalette::ButtonText, "#828284"); + darkActive.setColor(QPalette::Link, QColor(0x38, 0xa3, 0xd8)); + darkActive.setColor(QPalette::ButtonText, QColor(0x82, 0x82, 0x84)); return darkActive; } else { return original; @@ -59,19 +59,19 @@ Theme::Theme(std::string_view theme) auto p = paletteFromTheme(theme); separator_ = p.mid().color(); if (theme == "light") { - sidebarBackground_ = QColor("#233649"); - alternateButton_ = QColor("#ccc"); - red_ = QColor("#a82353"); - orange_ = QColor("#fcbe05"); + sidebarBackground_ = QColor(0x23, 0x36, 0x49); + alternateButton_ = QColor(0xcc, 0xcc, 0xcc); + red_ = QColor(0xa8, 0x23, 0x53); + orange_ = QColor(0xfc, 0xbe, 0x05); } else if (theme == "dark") { - sidebarBackground_ = QColor("#2d3139"); - alternateButton_ = QColor("#414A59"); - red_ = QColor("#a82353"); - orange_ = QColor("#fcc53a"); + sidebarBackground_ = QColor(0x2d, 0x31, 0x39); + alternateButton_ = QColor(0x41, 0x4A, 0x59); + red_ = QColor(0xa8, 0x23, 0x53); + orange_ = QColor(0xfc, 0xc5, 0x3a); } else { sidebarBackground_ = p.window().color(); alternateButton_ = p.dark().color(); - red_ = QColor("red"); - orange_ = QColor("orange"); + red_ = QColor(Qt::GlobalColor::red); + orange_ = QColor(0xff, 0xa5, 0x00); // SVG orange } }