aboutsummaryrefslogtreecommitdiff
path: root/include/BodyItem.hpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2022-11-06 13:54:02 +0100
committerdec05eba <dec05eba@protonmail.com>2022-11-07 14:24:32 +0100
commit8025d1075db0779bde635148f6e38303eb29d6c8 (patch)
tree64dce4cc00fa55edba0ab7d2522e13473e6ef3c4 /include/BodyItem.hpp
parentf8b3a9d055bfc0e4bb9e9a570ccc8853ec38a225 (diff)
Formatted text with color in matrix, monospace for codeblocks
Diffstat (limited to 'include/BodyItem.hpp')
-rw-r--r--include/BodyItem.hpp20
1 files changed, 14 insertions, 6 deletions
diff --git a/include/BodyItem.hpp b/include/BodyItem.hpp
index 819b730..b7dc48a 100644
--- a/include/BodyItem.hpp
+++ b/include/BodyItem.hpp
@@ -96,25 +96,28 @@ namespace QuickMedia {
dirty_timestamp = true;
}
- void set_title_color(mgl::Color new_color) {
- if(new_color == title_color)
+ void set_title_color(mgl::Color new_color, bool new_force_color = false) {
+ if(new_color == title_color && new_force_color == force_description_color)
return;
title_color = new_color;
dirty = true;
+ force_title_color = new_force_color;
}
- void set_description_color(mgl::Color new_color) {
- if(new_color == description_color)
+ void set_description_color(mgl::Color new_color, bool new_force_color = false) {
+ if(new_color == description_color && new_force_color == force_description_color)
return;
description_color = new_color;
dirty_description = true;
+ force_description_color = new_force_color;
}
- void set_author_color(mgl::Color new_color) {
- if(new_color == author_color)
+ void set_author_color(mgl::Color new_color, bool new_force_color = false) {
+ if(new_color == author_color && new_force_color == force_description_color)
return;
author_color = new_color;
dirty_author = true;
+ force_author_color = new_force_color;
}
void add_reaction(std::string text, void *userdata, mgl::Color text_color);
@@ -145,6 +148,8 @@ namespace QuickMedia {
void draw_list(Body *body, mgl::Window &render_target);
+ // TODO: Bits for bools
+
// TODO: Use a list of strings instead, not all plugins need all of these fields
std::string url;
std::string thumbnail_url;
@@ -156,6 +161,9 @@ namespace QuickMedia {
bool dirty_reactions;
// TODO: Remove this and instead if |thumbnail_url| starts with file://, then its a local file
bool thumbnail_is_local;
+ bool force_title_color = false;
+ bool force_description_color = false;
+ bool force_author_color = false;
std::unique_ptr<Text> title_text;
std::unique_ptr<Text> description_text;
std::unique_ptr<Text> author_text;