diff options
Diffstat (limited to 'src/BodyItem.cpp')
-rw-r--r-- | src/BodyItem.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/BodyItem.cpp b/src/BodyItem.cpp index ebc3ead..0c6e1ce 100644 --- a/src/BodyItem.cpp +++ b/src/BodyItem.cpp @@ -1,9 +1,12 @@ #include "../include/BodyItem.hpp" #include "../include/Theme.hpp" #include "../include/Config.hpp" -#include <cmath> namespace QuickMedia { + static float floor(float v) { + return (int)v; + } + // static std::shared_ptr<BodyItem> BodyItem::create(std::string title, bool selectable) { return std::shared_ptr<BodyItem>(new BodyItem(std::move(title), selectable)); @@ -78,7 +81,7 @@ namespace QuickMedia { void BodyItem::add_reaction(std::string text, void *userdata) { Reaction reaction; - reaction.text = std::make_unique<Text>(std::move(text), false, std::floor(get_config().body.reaction_font_size * get_config().scale * get_config().font_scale), 0.0f); + reaction.text = std::make_unique<Text>(std::move(text), false, 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)); } |