aboutsummaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2021-06-21 06:25:13 +0200
committerdec05eba <dec05eba@protonmail.com>2021-06-21 06:25:17 +0200
commit933ceeabb339cdf0583a8687528941593381a268 (patch)
treee3963cd74eb726a63f6e91f2f22f485fac65084a /src/gui
parentd137dcfa6dd248ffa94e58e7aef4487682bc12dc (diff)
Add color themeing, (Theme.hpp/Theme.cpp) and the env var QM_THEME
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/Button.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/Button.cpp b/src/gui/Button.cpp
index ebbb8bb..1f84335 100644
--- a/src/gui/Button.cpp
+++ b/src/gui/Button.cpp
@@ -1,4 +1,5 @@
#include "../../include/gui/Button.hpp"
+#include "../../include/Theme.hpp"
#include <SFML/Graphics/RenderTarget.hpp>
#include <SFML/Window/Event.hpp>
#include <cmath>
@@ -8,7 +9,7 @@ namespace QuickMedia {
Button::Button(const std::string &label, sf::Font *font, unsigned int character_size, float width, sf::Shader *rounded_rectangle_shader, float scale) :
label(label, *font, character_size * scale),
- background(sf::Vector2f(1.0f, 1.0f), 10.0f, sf::Color(33, 37, 44), rounded_rectangle_shader),
+ background(sf::Vector2f(1.0f, 1.0f), 10.0f, get_current_theme().shade_color, rounded_rectangle_shader),
scale(scale)
{
background.set_size(sf::Vector2f(std::floor(width * scale), get_height()));