diff options
author | Petr Mrázek <peterix@gmail.com> | 2016-11-01 08:50:23 +0100 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2016-11-01 09:04:37 +0100 |
commit | 2e0a45cc2f7b3b3b84d72905bb4217bc1cffbf85 (patch) | |
tree | de72c629b91b29ad274091101e5baf2f36ec3fed /application | |
parent | fe68d5946073d92bc585b2b5372c420218807c91 (diff) | |
download | MultiMC-2e0a45cc2f7b3b3b84d72905bb4217bc1cffbf85.tar MultiMC-2e0a45cc2f7b3b3b84d72905bb4217bc1cffbf85.tar.gz MultiMC-2e0a45cc2f7b3b3b84d72905bb4217bc1cffbf85.tar.lz MultiMC-2e0a45cc2f7b3b3b84d72905bb4217bc1cffbf85.tar.xz MultiMC-2e0a45cc2f7b3b3b84d72905bb4217bc1cffbf85.zip |
NOISSUE add bright theme to complement the dark theme
Same style, different colors.
Diffstat (limited to 'application')
-rw-r--r-- | application/CMakeLists.txt | 2 | ||||
-rw-r--r-- | application/MultiMC.cpp | 2 | ||||
-rw-r--r-- | application/themes/BrightTheme.cpp | 43 | ||||
-rw-r--r-- | application/themes/BrightTheme.h | 16 |
4 files changed, 63 insertions, 0 deletions
diff --git a/application/CMakeLists.txt b/application/CMakeLists.txt index 4a7d644d..38729de4 100644 --- a/application/CMakeLists.txt +++ b/application/CMakeLists.txt @@ -107,6 +107,8 @@ SET(MULTIMC_SOURCES InstanceWindow.cpp # GUI - themes + themes/BrightTheme.cpp + themes/BrightTheme.h themes/DarkTheme.cpp themes/DarkTheme.h themes/ITheme.h diff --git a/application/MultiMC.cpp b/application/MultiMC.cpp index a20666ca..6c284b35 100644 --- a/application/MultiMC.cpp +++ b/application/MultiMC.cpp @@ -14,6 +14,7 @@ #include "themes/ITheme.h" #include "themes/SystemTheme.h" #include "themes/DarkTheme.h" +#include "themes/BrightTheme.h" #include <iostream> #include <QDir> @@ -1010,6 +1011,7 @@ void MultiMC::initThemes() }; insertTheme(new SystemTheme()); insertTheme(new DarkTheme()); + insertTheme(new BrightTheme()); } void MultiMC::setApplicationTheme(const QString& name) diff --git a/application/themes/BrightTheme.cpp b/application/themes/BrightTheme.cpp new file mode 100644 index 00000000..b4d59b1f --- /dev/null +++ b/application/themes/BrightTheme.cpp @@ -0,0 +1,43 @@ +#include "BrightTheme.h" + +QString BrightTheme::id() +{ + return "bright"; +} + +QString BrightTheme::name() +{ + return QObject::tr("Bright"); +} + +QString BrightTheme::qtTheme() +{ + return "Fusion"; +} + +QPalette BrightTheme::colorScheme() +{ + QPalette brightPalette; + brightPalette.setColor(QPalette::Window, QColor(239,240,241)); + brightPalette.setColor(QPalette::WindowText, QColor(49,54,59)); + brightPalette.setColor(QPalette::Base, QColor(252,252,252)); + brightPalette.setColor(QPalette::AlternateBase, QColor(239,240,241)); + brightPalette.setColor(QPalette::ToolTipBase, QColor(49,54,59)); + brightPalette.setColor(QPalette::ToolTipText, QColor(239,240,241)); + brightPalette.setColor(QPalette::Text, QColor(49,54,59)); + brightPalette.setColor(QPalette::Button, QColor(239,240,241)); + brightPalette.setColor(QPalette::ButtonText, QColor(49,54,59)); + brightPalette.setColor(QPalette::BrightText, Qt::red); + brightPalette.setColor(QPalette::Link, QColor(41, 128, 185)); + + brightPalette.setColor(QPalette::Highlight, QColor(61, 174, 233)); + brightPalette.setColor(QPalette::HighlightedText, QColor(239,240,241)); + return brightPalette; +} + + +QString BrightTheme::appStyleSheet() +{ + return QString(); +} + diff --git a/application/themes/BrightTheme.h b/application/themes/BrightTheme.h new file mode 100644 index 00000000..e7e0f834 --- /dev/null +++ b/application/themes/BrightTheme.h @@ -0,0 +1,16 @@ +#pragma once + +#include "ITheme.h" + +class BrightTheme: public ITheme +{ +public: + virtual ~BrightTheme() {} + + QString qtTheme() override; + QString id() override; + QString name() override; + QString appStyleSheet() override; + QPalette colorScheme() override; +}; + |