From 081f5d8f7cb3ef38545164d6fae7d28c07b9dfae Mon Sep 17 00:00:00 2001 From: dec05eba Date: Thu, 24 Sep 2020 02:56:59 +0200 Subject: Fix resize after watching 4chan/matrix video in fullscreen --- src/Body.cpp | 3 ++- src/QuickMedia.cpp | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/Body.cpp b/src/Body.cpp index c53a476..52999e5 100644 --- a/src/Body.cpp +++ b/src/Body.cpp @@ -260,7 +260,8 @@ namespace QuickMedia { return path.c_str() + index; } - // TODO: Do not load thumbnails for images larger than 30mb + // TODO: Do not load thumbnails for images larger than 30mb. + // TODO: Load the thumbnail embedded in the file instead. std::shared_ptr Body::load_thumbnail_from_url(const std::string &url, bool local, sf::Vector2i thumbnail_resize_target_size) { auto result = std::make_shared(); result->setSmooth(true); diff --git a/src/QuickMedia.cpp b/src/QuickMedia.cpp index c481d49..a11ce2a 100644 --- a/src/QuickMedia.cpp +++ b/src/QuickMedia.cpp @@ -511,6 +511,7 @@ namespace QuickMedia { case Page::EPISODE_LIST: body->draw_thumbnails = false; episode_list_page(); + body->clear_thumbnails(); break; case Page::IMAGES: { body->draw_thumbnails = false; @@ -536,11 +537,13 @@ namespace QuickMedia { case Page::CONTENT_LIST: { body->draw_thumbnails = true; content_list_page(); + body->clear_thumbnails(); break; } case Page::CONTENT_DETAILS: { body->draw_thumbnails = true; content_details_page(); + body->clear_thumbnails(); break; } case Page::IMAGE_BOARD_THREAD_LIST: { @@ -2843,6 +2846,7 @@ namespace QuickMedia { watched_videos.clear(); video_content_page(); content_url = std::move(prev_content_url); + redraw = true; } else { navigation_stage = NavigationStage::VIEWING_ATTACHED_IMAGE; load_image_future = std::async(std::launch::async, [this, &image_board, &attached_image_texture, &attached_image_sprite, &attachment_load_mutex]() -> bool { @@ -3363,6 +3367,7 @@ namespace QuickMedia { content_url = selected_item->url; current_page = Page::VIDEO_CONTENT; video_content_page(); + redraw = true; } } -- cgit v1.2.3