diff options
author | dec05eba <dec05eba@protonmail.com> | 2021-06-21 06:25:13 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2021-06-21 06:25:17 +0200 |
commit | 933ceeabb339cdf0583a8687528941593381a268 (patch) | |
tree | e3963cd74eb726a63f6e91f2f22f485fac65084a /include | |
parent | d137dcfa6dd248ffa94e58e7aef4487682bc12dc (diff) |
Add color themeing, (Theme.hpp/Theme.cpp) and the env var QM_THEME
Diffstat (limited to 'include')
-rw-r--r-- | include/Tabs.hpp | 3 | ||||
-rw-r--r-- | include/Theme.hpp | 41 |
2 files changed, 43 insertions, 1 deletions
diff --git a/include/Tabs.hpp b/include/Tabs.hpp index f7c3054..b7d8de6 100644 --- a/include/Tabs.hpp +++ b/include/Tabs.hpp @@ -17,7 +17,8 @@ namespace QuickMedia { class Tabs { public: - Tabs(sf::Shader *rounded_rectangle_shader, sf::Color shade_color = sf::Color(33, 37, 44)); + Tabs(sf::Shader *rounded_rectangle_shader); + Tabs(sf::Shader *rounded_rectangle_shader, sf::Color shade_color); static float get_height(); static float get_shade_height(); diff --git a/include/Theme.hpp b/include/Theme.hpp new file mode 100644 index 0000000..e466931 --- /dev/null +++ b/include/Theme.hpp @@ -0,0 +1,41 @@ +#pragma once + +#include <SFML/Graphics/Color.hpp> + +namespace QuickMedia { + struct Theme { + enum { + THEME_DARK // Default theme + }; + + Theme() = default; + Theme(Theme&) = delete; + Theme&operator=(Theme&) = delete; + + sf::Color background_color; + sf::Color text_color; + sf::Color faded_text_color; + sf::Color shade_color; + sf::Color selected_color; + sf::Color card_item_background_color; + sf::Color replies_text_color; + sf::Color placeholder_text_color; + sf::Color image_loading_background_color; + sf::Color attention_alert_text_color; + sf::Color cancel_button_background_color; + sf::Color confirm_button_background_color; + sf::Color loading_bar_color; + sf::Color embedded_item_border_color; + sf::Color provisional_message_color; + sf::Color failed_text_color; + sf::Color timestamp_text_color; + sf::Color new_items_alert_color; + sf::Color arrow_color; + sf::Color url_text_color; + sf::Color loading_page_color; + }; + + void init_themes(); + void set_current_theme(int theme); + Theme& get_current_theme(); +}
\ No newline at end of file |