diff options
Diffstat (limited to 'src/QuickMedia.cpp')
-rw-r--r-- | src/QuickMedia.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/QuickMedia.cpp b/src/QuickMedia.cpp index 994d14c..a0d8508 100644 --- a/src/QuickMedia.cpp +++ b/src/QuickMedia.cpp @@ -3410,6 +3410,9 @@ namespace QuickMedia { sf::Vertex gradient_points[4]; double gradient_inc = 0; + sf::RectangleShape more_messages_below_rect; + more_messages_below_rect.setFillColor(sf::Color(128, 50, 50)); + sf::Clock start_typing_timer; const double typing_timeout_seconds = 3.0; bool typing = false; @@ -3558,6 +3561,7 @@ namespace QuickMedia { if(matrix->post_file(current_room_id, selected_files[0]) != PluginResult::OK) show_notification("QuickMedia", "Failed to upload image to room", Urgency::CRITICAL); } + redraw = true; break; } case Page::CHAT_LOGIN: { @@ -3622,6 +3626,9 @@ namespace QuickMedia { body_pos = sf::Vector2f(body_padding_horizontal, body_padding_vertical + tab_shade_height); body_size = sf::Vector2f(body_width, window_size.y - input_bottom - body_padding_vertical - tab_shade_height); //get_body_dimensions(window_size, &chat_input, body_pos, body_size, true); + + more_messages_below_rect.setSize(sf::Vector2f(window_size.x, gradient_height)); + more_messages_below_rect.setPosition(0.0f, std::floor(window_size.y - chat_input.getBottomWithoutShadow() - gradient_height)); } if(!sync_running && sync_timer.getElapsedTime().asMilliseconds() >= sync_min_time_ms) { @@ -3728,6 +3735,10 @@ namespace QuickMedia { window.draw(gradient_points, 4, sf::Quads); // Note: sf::Quads doesn't work with egl } + if(tabs[selected_tab].type == ChatTabType::MESSAGES && !tabs[selected_tab].body->is_last_item_fully_visible()) { + window.draw(more_messages_below_rect); + } + window.display(); } |