aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRat <ratcodeberg@protonmail.com>2021-06-21 19:28:39 +0300
committerdec05eba <dec05eba@protonmail.com>2021-06-21 18:34:13 +0200
commitb11c3abc93decfcf82140b92d83a1278bcc51375 (patch)
tree57cd6b2442d1787ff71d0394c3559dc332053ac4
parent9d2fbadd55a1c7c89660fcec430a945867ded527 (diff)
hello yes nigeol i added le epic nord theme
-rw-r--r--include/Theme.hpp5
-rw-r--r--src/Theme.cpp31
2 files changed, 32 insertions, 4 deletions
diff --git a/include/Theme.hpp b/include/Theme.hpp
index 653cfe9..6fee3a5 100644
--- a/include/Theme.hpp
+++ b/include/Theme.hpp
@@ -5,7 +5,8 @@
namespace QuickMedia {
struct Theme {
enum {
- THEME_DARK // Default theme
+ THEME_DARK, // Default theme
+ THEME_NORD
};
Theme() = default;
@@ -40,4 +41,4 @@ namespace QuickMedia {
void init_themes();
void set_current_theme(int theme);
Theme& get_current_theme();
-} \ No newline at end of file
+}
diff --git a/src/Theme.cpp b/src/Theme.cpp
index 6616721..f6fe9e5 100644
--- a/src/Theme.cpp
+++ b/src/Theme.cpp
@@ -8,7 +8,7 @@ namespace QuickMedia {
static bool themes_initialized = false;
static int current_theme = Theme::THEME_DARK;
- static Theme themes[1];
+ static Theme themes[2];
static void init_theme_dark() {
themes[Theme::THEME_DARK].background_color = sf::Color(21, 25, 30);
@@ -35,11 +35,36 @@ namespace QuickMedia {
themes[Theme::THEME_DARK].blur_enabled = true;
}
+ static void init_theme_nord() {
+ themes[Theme::THEME_NORD].background_color = sf::Color(46, 52, 64);
+ themes[Theme::THEME_NORD].text_color = sf::Color(236, 239, 244);
+ themes[Theme::THEME_NORD].faded_text_color = sf::Color(229, 233, 240);
+ themes[Theme::THEME_NORD].shade_color = sf::Color(67, 76, 94);
+ themes[Theme::THEME_NORD].selected_color = sf::Color(59, 66, 82);
+ themes[Theme::THEME_NORD].card_item_background_color = sf::Color(76, 86, 106);
+ themes[Theme::THEME_NORD].replies_text_color = sf::Color(136, 192, 208);
+ themes[Theme::THEME_NORD].placeholder_text_color = sf::Color(236, 239, 244);
+ themes[Theme::THEME_NORD].image_loading_background_color = sf::Color(216, 222, 233);
+ themes[Theme::THEME_NORD].attention_alert_text_color = sf::Color(191, 97, 106);
+ themes[Theme::THEME_NORD].cancel_button_background_color = sf::Color(229, 233, 240);
+ themes[Theme::THEME_NORD].confirm_button_background_color = sf::Color(229, 233, 240);
+ themes[Theme::THEME_NORD].loading_bar_color = sf::Color(136, 192, 208);
+ themes[Theme::THEME_NORD].embedded_item_border_color = sf::Color(216, 222, 233);
+ themes[Theme::THEME_NORD].provisional_message_color = sf::Color(236, 239, 244);
+ themes[Theme::THEME_NORD].failed_text_color = sf::Color(191, 97, 106);
+ themes[Theme::THEME_NORD].timestamp_text_color = sf::Color(76, 86, 106);
+ themes[Theme::THEME_NORD].new_items_alert_color = sf::Color(235, 203, 139);
+ themes[Theme::THEME_NORD].arrow_color = sf::Color(236, 239, 244);
+ themes[Theme::THEME_NORD].url_text_color = sf::Color(136, 192, 208);
+ themes[Theme::THEME_NORD].loading_page_color = sf::Color(229, 233, 240);
+ }
+
void init_themes() {
if(themes_initialized)
return;
init_theme_dark();
+ init_theme_nord();
themes_initialized = true;
char *theme = getenv("QM_THEME");
@@ -48,6 +73,8 @@ namespace QuickMedia {
if(strcmp(theme, "default") == 0)
set_current_theme(Theme::THEME_DARK);
+ else if(strcmp(theme, "nord") == 0)
+ set_current_theme(Theme::THEME_NORD);
else
fprintf(stderr, "Warning: Invalid theme %s, using the default theme...\n", theme);
}
@@ -60,4 +87,4 @@ namespace QuickMedia {
assert(themes_initialized);
return themes[current_theme];
}
-} \ No newline at end of file
+}