From fa815c3eee27cdae69b2e765b03de62a13f6379d Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sat, 4 Sep 2021 02:31:10 +0200 Subject: Make font sizes customizable with a config file, see example-config.json. Remove environment variables --- src/BodyItem.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/BodyItem.cpp') 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 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(std::move(str), false, std::floor(14 * get_ui_scale() * get_font_scale()), 0.0f); + reaction.text = std::make_unique(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)); } -- cgit v1.2.3