aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2020-09-24 01:26:12 +0200
committerdec05eba <dec05eba@protonmail.com>2020-09-24 01:26:12 +0200
commit35508a1c737056c4ff821d1d5c40bea4715dffc8 (patch)
tree69540206faf45445d12f9d8c46e34d97bac3a7f1 /include
parent4f33e96ef1b2323e88206dc9a3deb4fc2c333738 (diff)
Fix broken author text
Diffstat (limited to 'include')
-rw-r--r--include/Body.hpp2
-rw-r--r--include/Text.hpp5
2 files changed, 5 insertions, 2 deletions
diff --git a/include/Body.hpp b/include/Body.hpp
index 235de72..f246b5a 100644
--- a/include/Body.hpp
+++ b/include/Body.hpp
@@ -56,6 +56,7 @@ namespace QuickMedia {
bool thumbnail_is_local;
std::unique_ptr<Text> title_text;
std::unique_ptr<Text> description_text;
+ std::unique_ptr<Text> author_text;
// Used by image boards for example. The elements are indices to other body items
std::vector<size_t> replies;
std::string post_number;
@@ -106,7 +107,6 @@ namespace QuickMedia {
sf::Font *bold_font;
sf::Font *cjk_font;
sf::Text progress_text;
- sf::Text author_text;
sf::Text replies_text;
BodyItems items;
std::thread thumbnail_load_thread;
diff --git a/include/Text.hpp b/include/Text.hpp
index d70f356..bc6f7ab 100644
--- a/include/Text.hpp
+++ b/include/Text.hpp
@@ -69,8 +69,11 @@ namespace QuickMedia
void setLineSpacing(float lineSpacing);
void setCharacterSpacing(float characterSpacing);
void setEditable(bool editable);
+
+ // Note: won't update until @draw is called
+ float getWidth() const;
- // Warning: won't update until @draw is called
+ // Note: won't update until @draw is called
float getHeight() const;
void processEvent(const sf::Event &event);