aboutsummaryrefslogtreecommitdiff
path: root/src/Entry.cpp
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/Entry.cpp
parentd137dcfa6dd248ffa94e58e7aef4487682bc12dc (diff)
Add color themeing, (Theme.hpp/Theme.cpp) and the env var QM_THEME
Diffstat (limited to 'src/Entry.cpp')
-rw-r--r--src/Entry.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Entry.cpp b/src/Entry.cpp
index 8e1fbfb..ce86f8f 100644
--- a/src/Entry.cpp
+++ b/src/Entry.cpp
@@ -1,6 +1,7 @@
#include "../include/Entry.hpp"
#include "../include/ResourceLoader.hpp"
#include "../include/Utils.hpp"
+#include "../include/Theme.hpp"
#include <SFML/Graphics/RenderWindow.hpp>
#include <SFML/Graphics/RectangleShape.hpp>
#include <SFML/Window/Event.hpp>
@@ -16,12 +17,12 @@ namespace QuickMedia {
draw_background(true),
text("", false, std::floor(16 * get_ui_scale()), 0.0f),
width(0.0f),
- background(sf::Vector2f(1.0f, 1.0f), 10.0f, sf::Color(55, 60, 68), rounded_rectangle_shader),
+ background(sf::Vector2f(1.0f, 1.0f), 10.0f, get_current_theme().selected_color, rounded_rectangle_shader),
placeholder(placeholder_text, *FontLoader::get_font(FontLoader::FontType::LATIN), std::floor(16 * get_ui_scale())),
mouse_left_inside(false)
{
text.setEditable(true);
- placeholder.setFillColor(sf::Color(255, 255, 255, 100));
+ placeholder.setFillColor(get_current_theme().placeholder_text_color);
}
void Entry::process_event(sf::Event &event) {