diff options
author | dec05eba <dec05eba@protonmail.com> | 2021-03-22 14:24:46 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2021-03-22 14:24:46 +0100 |
commit | 1bd8a4008499c78e4ee6ed40fd01657506b24983 (patch) | |
tree | 6e167aabdc1c21445f9a062f3dbd5b635e1e9c46 | |
parent | a59acdce5e21a65dd06d8d1d17359bd3159f518c (diff) |
Matrix: Properly hide background when replying/editing
-rw-r--r-- | src/QuickMedia.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/QuickMedia.cpp b/src/QuickMedia.cpp index 85c3241..7835af2 100644 --- a/src/QuickMedia.cpp +++ b/src/QuickMedia.cpp @@ -4931,23 +4931,17 @@ namespace QuickMedia { const float item_height = std::min(body_size.y - replying_to_text_height - margin, tabs[MESSAGES_TAB_INDEX].body->get_item_height(currently_operating_on_item.get(), body_size.x) + margin); - sf::RectangleShape overlay(sf::Vector2f(window_size.x, window_size.y - tab_shade_height - chat_input_height_full)); - overlay.setPosition(0.0f, tab_shade_height); + sf::RectangleShape overlay(sf::Vector2f(window_size.x, window_size.y - chat_input_height_full)); overlay.setFillColor(sf::Color(0, 0, 0, 240)); window.draw(overlay); sf::Vector2f body_item_pos(body_pos.x, window_size.y - chat_input_height_full - item_height); sf::Vector2f body_item_size(body_size.x, item_height); - sf::RectangleShape item_background(sf::Vector2f(window_size.x, body_item_size.y + replying_to_text_height + margin)); + sf::RectangleShape item_background(sf::Vector2f(window_size.x, body_item_size.y + replying_to_text_height + margin + body_item_size.y)); item_background.setPosition(sf::Vector2f(0.0f, body_item_pos.y - replying_to_text_height - margin)); item_background.setFillColor(back_color); window.draw(item_background); - - sf::RectangleShape message_box_shade_left(sf::Vector2f(body_pos.x, chat_input_height_full)); - message_box_shade_left.setPosition(0.0f, window_size.y - chat_input_height_full); - message_box_shade_left.setFillColor(chat_input_shade.getFillColor()); - window.draw(message_box_shade_left); replying_to_text.setPosition(body_item_pos.x, body_item_pos.y - replying_to_text_height); window.draw(replying_to_text); |