mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-08-02 03:26:40 -04:00
add dark theme (#2695)
This commit is contained in:
parent
ea38a0fe48
commit
20f28c8331
4 changed files with 144 additions and 1 deletions
|
@ -34,6 +34,7 @@ constexpr std::string_view mayhem_information_list[] = {
|
||||||
"RedFox-Fr,nemanjan00,",
|
"RedFox-Fr,nemanjan00,",
|
||||||
"MichalLeonBorsuk,",
|
"MichalLeonBorsuk,",
|
||||||
"MatiasFernandez,Giorgiofox",
|
"MatiasFernandez,Giorgiofox",
|
||||||
|
"TommasoVentafridda",
|
||||||
" ",
|
" ",
|
||||||
"#Havoc:",
|
"#Havoc:",
|
||||||
"jboone,furrtek,eried,argilo,",
|
"jboone,furrtek,eried,argilo,",
|
||||||
|
|
|
@ -954,6 +954,7 @@ class SetThemeView : public View {
|
||||||
{"Aqua", 2},
|
{"Aqua", 2},
|
||||||
{"Green", 3},
|
{"Green", 3},
|
||||||
{"Red", 4},
|
{"Red", 4},
|
||||||
|
{"Dark", 5},
|
||||||
},
|
},
|
||||||
true};
|
true};
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
#include "theme.hpp"
|
#include "theme.hpp"
|
||||||
|
|
||||||
namespace ui {
|
namespace ui {
|
||||||
|
@ -25,6 +24,9 @@ void Theme::SetTheme(ThemeId theme) {
|
||||||
case Red:
|
case Red:
|
||||||
current = new ThemeRed();
|
current = new ThemeRed();
|
||||||
break;
|
break;
|
||||||
|
case Dark:
|
||||||
|
current = new ThemeDark();
|
||||||
|
break;
|
||||||
case DefaultGrey:
|
case DefaultGrey:
|
||||||
default:
|
default:
|
||||||
current = new ThemeDefault();
|
current = new ThemeDefault();
|
||||||
|
@ -725,4 +727,137 @@ ThemeRed::ThemeRed() {
|
||||||
bg_table_header = new Color{205, 30, 0};
|
bg_table_header = new Color{205, 30, 0};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ThemeDark::ThemeDark() {
|
||||||
|
bg_lightest = new Style{
|
||||||
|
.font = font::fixed_8x16,
|
||||||
|
.background = {32, 32, 32},
|
||||||
|
.foreground = Color::white(),
|
||||||
|
};
|
||||||
|
bg_lightest_small = new Style{
|
||||||
|
.font = font::fixed_5x8,
|
||||||
|
.background = {32, 32, 32},
|
||||||
|
.foreground = Color::white(),
|
||||||
|
};
|
||||||
|
bg_light = new Style{
|
||||||
|
.font = font::fixed_8x16,
|
||||||
|
.background = {24, 24, 24},
|
||||||
|
.foreground = Color::white(),
|
||||||
|
};
|
||||||
|
bg_medium = new Style{
|
||||||
|
.font = font::fixed_8x16,
|
||||||
|
.background = {16, 16, 16},
|
||||||
|
.foreground = Color::white(),
|
||||||
|
};
|
||||||
|
bg_dark = new Style{
|
||||||
|
.font = font::fixed_8x16,
|
||||||
|
.background = {8, 8, 8},
|
||||||
|
.foreground = Color::white(),
|
||||||
|
};
|
||||||
|
bg_darker = new Style{
|
||||||
|
.font = font::fixed_8x16,
|
||||||
|
.background = {4, 4, 4},
|
||||||
|
.foreground = Color::white(),
|
||||||
|
};
|
||||||
|
|
||||||
|
bg_darkest = new Style{
|
||||||
|
.font = font::fixed_8x16,
|
||||||
|
.background = Color::black(),
|
||||||
|
.foreground = Color::white(),
|
||||||
|
};
|
||||||
|
bg_darkest_small = new Style{
|
||||||
|
.font = font::fixed_5x8,
|
||||||
|
.background = Color::black(),
|
||||||
|
.foreground = Color::white(),
|
||||||
|
};
|
||||||
|
|
||||||
|
bg_important_small = new Style{
|
||||||
|
.font = font::fixed_5x8,
|
||||||
|
.background = {64, 64, 64},
|
||||||
|
.foreground = Color::white(),
|
||||||
|
};
|
||||||
|
|
||||||
|
error_dark = new Style{
|
||||||
|
.font = font::fixed_8x16,
|
||||||
|
.background = Color::black(),
|
||||||
|
.foreground = Color::red(),
|
||||||
|
};
|
||||||
|
warning_dark = new Style{
|
||||||
|
.font = font::fixed_8x16,
|
||||||
|
.background = Color::black(),
|
||||||
|
.foreground = Color::yellow(),
|
||||||
|
};
|
||||||
|
ok_dark = new Style{
|
||||||
|
.font = font::fixed_8x16,
|
||||||
|
.background = Color::black(),
|
||||||
|
.foreground = Color::green(),
|
||||||
|
};
|
||||||
|
|
||||||
|
fg_dark = new Style{
|
||||||
|
.font = font::fixed_8x16,
|
||||||
|
.background = Color::black(),
|
||||||
|
.foreground = {96, 96, 96},
|
||||||
|
};
|
||||||
|
fg_medium = new Style{
|
||||||
|
.font = font::fixed_8x16,
|
||||||
|
.background = Color::black(),
|
||||||
|
.foreground = {128, 128, 128},
|
||||||
|
};
|
||||||
|
fg_light = new Style{
|
||||||
|
.font = font::fixed_8x16,
|
||||||
|
.background = Color::black(),
|
||||||
|
.foreground = Color::white(),
|
||||||
|
};
|
||||||
|
|
||||||
|
fg_red = new Style{
|
||||||
|
.font = font::fixed_8x16,
|
||||||
|
.background = Color::black(),
|
||||||
|
.foreground = Color::red(),
|
||||||
|
};
|
||||||
|
fg_green = new Style{
|
||||||
|
.font = font::fixed_8x16,
|
||||||
|
.background = Color::black(),
|
||||||
|
.foreground = Color::green(),
|
||||||
|
};
|
||||||
|
fg_yellow = new Style{
|
||||||
|
.font = font::fixed_8x16,
|
||||||
|
.background = Color::black(),
|
||||||
|
.foreground = Color::yellow(),
|
||||||
|
};
|
||||||
|
fg_orange = new Style{
|
||||||
|
.font = font::fixed_8x16,
|
||||||
|
.background = Color::black(),
|
||||||
|
.foreground = Color::orange(),
|
||||||
|
};
|
||||||
|
fg_blue = new Style{
|
||||||
|
.font = font::fixed_8x16,
|
||||||
|
.background = Color::black(),
|
||||||
|
.foreground = Color::blue(),
|
||||||
|
};
|
||||||
|
fg_cyan = new Style{
|
||||||
|
.font = font::fixed_8x16,
|
||||||
|
.background = Color::black(),
|
||||||
|
.foreground = Color::cyan(),
|
||||||
|
};
|
||||||
|
fg_darkcyan = new Style{
|
||||||
|
.font = font::fixed_8x16,
|
||||||
|
.background = Color::black(),
|
||||||
|
.foreground = Color::dark_cyan(),
|
||||||
|
};
|
||||||
|
fg_magenta = new Style{
|
||||||
|
.font = font::fixed_8x16,
|
||||||
|
.background = Color::black(),
|
||||||
|
.foreground = Color::magenta(),
|
||||||
|
};
|
||||||
|
|
||||||
|
option_active = new Style{
|
||||||
|
.font = font::fixed_8x16,
|
||||||
|
.background = {64, 64, 64},
|
||||||
|
.foreground = Color::white(),
|
||||||
|
};
|
||||||
|
|
||||||
|
status_active = new Color{0, 255, 0};
|
||||||
|
|
||||||
|
bg_table_header = new Color{48, 48, 48};
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace ui
|
} // namespace ui
|
|
@ -93,6 +93,11 @@ class ThemeRed : public ThemeTemplate {
|
||||||
ThemeRed();
|
ThemeRed();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class ThemeDark : public ThemeTemplate {
|
||||||
|
public:
|
||||||
|
ThemeDark();
|
||||||
|
};
|
||||||
|
|
||||||
class Theme {
|
class Theme {
|
||||||
public:
|
public:
|
||||||
enum ThemeId {
|
enum ThemeId {
|
||||||
|
@ -101,6 +106,7 @@ class Theme {
|
||||||
Aqua = 2,
|
Aqua = 2,
|
||||||
Green = 3,
|
Green = 3,
|
||||||
Red = 4,
|
Red = 4,
|
||||||
|
Dark = 5,
|
||||||
MAX
|
MAX
|
||||||
};
|
};
|
||||||
static ThemeTemplate* getInstance();
|
static ThemeTemplate* getInstance();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue