From 12cdc09759edf506fbafe051895343b20a67798c Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sat, 17 Oct 2020 18:56:44 +0200 Subject: Matrix: make text that mentions us red --- src/Body.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src/Body.cpp') diff --git a/src/Body.cpp b/src/Body.cpp index 11692aa..73f101f 100644 --- a/src/Body.cpp +++ b/src/Body.cpp @@ -24,11 +24,12 @@ namespace QuickMedia { dirty_author(false), dirty_timestamp(false), thumbnail_is_local(false), - title_color(sf::Color::White), - author_color(sf::Color::White), userdata(nullptr), last_drawn_time(0), - timestamp(0) + timestamp(0), + title_color(sf::Color::White), + author_color(sf::Color::White), + description_color(sf::Color::White) { if(!_title.empty()) set_title(std::move(_title)); @@ -430,7 +431,7 @@ namespace QuickMedia { body_item->title_text->setString(std::move(str)); else body_item->title_text = std::make_unique(std::move(str), font, cjk_font, 16, size.x - 50 - image_padding_x * 2.0f); - body_item->title_text->setFillColor(body_item->title_color); + body_item->title_text->setFillColor(body_item->get_title_color()); body_item->title_text->updateGeometry(); } @@ -441,6 +442,7 @@ namespace QuickMedia { body_item->description_text->setString(std::move(str)); else body_item->description_text = std::make_unique(std::move(str), font, cjk_font, 14, size.x - 50 - image_padding_x * 2.0f); + body_item->description_text->setFillColor(body_item->get_description_color()); body_item->description_text->updateGeometry(); } @@ -451,7 +453,7 @@ namespace QuickMedia { body_item->author_text->setString(std::move(str)); else body_item->author_text = std::make_unique(std::move(str), bold_font, cjk_font, 14, size.x - 50 - image_padding_x * 2.0f); - body_item->author_text->setFillColor(body_item->author_color); + body_item->author_text->setFillColor(body_item->get_author_color()); body_item->author_text->updateGeometry(); } @@ -642,7 +644,6 @@ namespace QuickMedia { //title_text.setPosition(std::floor(item_pos.x + text_offset_x), std::floor(item_pos.y + padding_y)); //window.draw(title_text); if(item->title_text) { - item->title_text->setFillColor(item->title_color); item->title_text->setPosition(std::floor(item_pos.x + text_offset_x), std::floor(item_pos.y + padding_y - 6.0f)); item->title_text->setMaxWidth(size.x - text_offset_x - image_padding_x); item->title_text->draw(window); -- cgit v1.2.3