Use Google Turbo Color for Default Theme WF colors (#748)

* Use Google Turbo Color for Default Theme WF colors

* Added Default Jet Waterfall as the old WF color theme

* Oups duplicate IDs for widgets is wrong
This commit is contained in:
Vincent Sonnier 2019-09-23 07:24:04 +02:00 committed by GitHub
parent e0d1e2b6ff
commit 4f7dcd4d89
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 69 additions and 21 deletions

View File

@ -603,6 +603,7 @@ wxMenu *AppFrame::makeDisplayMenu() {
int themeId = wxGetApp().getConfig()->getTheme();
themeMenu->AppendRadioItem(wxID_THEME_DEFAULT, "Default")->Check(themeId==COLOR_THEME_DEFAULT);
themeMenu->AppendRadioItem(wxID_THEME_DEFAULT_JET, "Default (Jet Waterfall)")->Check(themeId == COLOR_THEME_DEFAULT_JET);
themeMenu->AppendRadioItem(wxID_THEME_RADAR, "RADAR")->Check(themeId==COLOR_THEME_RADAR);
themeMenu->AppendRadioItem(wxID_THEME_BW, "Black & White")->Check(themeId==COLOR_THEME_BW);
themeMenu->AppendRadioItem(wxID_THEME_SHARP, "Sharp")->Check(themeId==COLOR_THEME_SHARP);
@ -1316,10 +1317,13 @@ bool AppFrame::actionOnMenuDisplay(wxCommandEvent& event) {
//by default, is managed.
bool bManaged = true;
if (event.GetId() == wxID_THEME_DEFAULT) {
ThemeMgr::mgr.setTheme(COLOR_THEME_DEFAULT);
}
else if (event.GetId() == wxID_THEME_DEFAULT_JET) {
ThemeMgr::mgr.setTheme(COLOR_THEME_DEFAULT_JET);
}
else if (event.GetId() == wxID_THEME_SHARP) {
ThemeMgr::mgr.setTheme(COLOR_THEME_SHARP);
}

View File

@ -337,15 +337,16 @@ private:
#define wxID_VIS_SPLITTER 2051
#define wxID_BM_SPLITTER 2052
#define wxID_THEME_DEFAULT 2100
#define wxID_THEME_SHARP 2101
#define wxID_THEME_BW 2102
#define wxID_THEME_RAD 2103
#define wxID_THEME_TOUCH 2104
#define wxID_THEME_HD 2105
#define wxID_THEME_RADAR 2106
#define wxID_THEME_DEFAULT 2070
#define wxID_THEME_DEFAULT_JET 2071
#define wxID_THEME_SHARP 2072
#define wxID_THEME_BW 2073
#define wxID_THEME_RAD 2074
#define wxID_THEME_TOUCH 2075
#define wxID_THEME_HD 2076
#define wxID_THEME_RADAR 2077
#define wxID_DISPLAY_BOOKMARKS 2107
#define wxID_DISPLAY_BOOKMARKS 2100
#define wxID_BANDWIDTH_BASE 2150
#define wxID_BANDWIDTH_MANUAL_DIALOG 2199

View File

@ -5,13 +5,25 @@
#include <stddef.h>
Gradient::Gradient() {
//nothing
}
void Gradient::clear() {
colors.clear();
}
void Gradient::addColor(GradientColor c) {
colors.push_back(c);
}
void Gradient::addColors(const std::vector<GradientColor>& color_list) {
for (auto single_color : color_list) {
colors.push_back(single_color);
}
}
std::vector<float> &Gradient::getRed() {
return r_val;
}

View File

@ -21,6 +21,10 @@ public:
void addColor(GradientColor c);
void clear();
void addColors(const std::vector<GradientColor>& color_list);
std::vector<float> &getRed();
std::vector<float> &getGreen();
std::vector<float> &getBlue();

File diff suppressed because one or more lines are too long

View File

@ -11,13 +11,14 @@
#include <wx/colour.h>
#define COLOR_THEME_DEFAULT 0
#define COLOR_THEME_BW 1
#define COLOR_THEME_SHARP 2
#define COLOR_THEME_RAD 3
#define COLOR_THEME_TOUCH 4
#define COLOR_THEME_HD 5
#define COLOR_THEME_RADAR 6
#define COLOR_THEME_MAX 7
#define COLOR_THEME_DEFAULT_JET 1
#define COLOR_THEME_BW 2
#define COLOR_THEME_SHARP 3
#define COLOR_THEME_RAD 4
#define COLOR_THEME_TOUCH 5
#define COLOR_THEME_HD 6
#define COLOR_THEME_RADAR 7
#define COLOR_THEME_MAX 8
class RGBA4f {
public:
@ -101,6 +102,11 @@ public:
DefaultColorTheme();
};
class DefaultColorThemeJet : public DefaultColorTheme {
public:
DefaultColorThemeJet();
};
class BlackAndWhiteColorTheme: public ColorTheme {
public:
BlackAndWhiteColorTheme();