diff options
author | dec05eba <dec05eba@protonmail.com> | 2022-02-17 19:18:19 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2022-02-17 19:18:34 +0100 |
commit | 02e029ed40f801e0710b09062069e7083cd30b93 (patch) | |
tree | b3bd567ad0c03074064d62d32a876920aa58fab4 /src/BodyItem.cpp | |
parent | d4cd63129ae5dff8fd69525424e0f8cb9ae1a905 (diff) |
Add local anime tracking. Check readme for more info about local_anime config
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)); } |