aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2020-09-24 02:56:59 +0200
committerdec05eba <dec05eba@protonmail.com>2020-09-24 03:36:20 +0200
commit081f5d8f7cb3ef38545164d6fae7d28c07b9dfae (patch)
treec8124f9d449a5ad5e155801ff56da1b30c1723a6 /src
parentbe1e24edae3a6f388929569269c27c53e28b8921 (diff)
Fix resize after watching 4chan/matrix video in fullscreen
Diffstat (limited to 'src')
-rw-r--r--src/Body.cpp3
-rw-r--r--src/QuickMedia.cpp5
2 files changed, 7 insertions, 1 deletions
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<sf::Texture> Body::load_thumbnail_from_url(const std::string &url, bool local, sf::Vector2i thumbnail_resize_target_size) {
auto result = std::make_shared<sf::Texture>();
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;
}
}