aboutsummaryrefslogtreecommitdiff
path: root/src/BodyItem.cpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2021-09-04 02:31:10 +0200
committerdec05eba <dec05eba@protonmail.com>2021-09-04 02:31:10 +0200
commitfa815c3eee27cdae69b2e765b03de62a13f6379d (patch)
tree4244ae7b62e2c94d749f0b199dd620bdd251dad0 /src/BodyItem.cpp
parentdd4573e05cdfa2d9b99ef7a49c99e27c201da3e9 (diff)
Make font sizes customizable with a config file, see example-config.json. Remove environment variables
Diffstat (limited to 'src/BodyItem.cpp')
-rw-r--r--src/BodyItem.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/BodyItem.cpp b/src/BodyItem.cpp
index 8fd5362..70d9d45 100644
--- a/src/BodyItem.cpp
+++ b/src/BodyItem.cpp
@@ -1,6 +1,6 @@
#include "../include/BodyItem.hpp"
#include "../include/Theme.hpp"
-#include "../include/Utils.hpp"
+#include "../include/Config.hpp"
#include <cmath>
namespace QuickMedia {
@@ -72,7 +72,7 @@ namespace QuickMedia {
void BodyItem::add_reaction(std::string text, void *userdata) {
sf::String str = sf::String::fromUtf8(text.begin(), text.end());
Reaction reaction;
- reaction.text = std::make_unique<Text>(std::move(str), false, std::floor(14 * get_ui_scale() * get_font_scale()), 0.0f);
+ reaction.text = std::make_unique<Text>(std::move(str), false, std::floor(get_config().body.reaction_font_size * get_config().scale * get_config().font_scale), 0.0f);
reaction.userdata = userdata;
reactions.push_back(std::move(reaction));
}