From 4b99e44bfc320d01f6727c85be878bb72eb12257 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Thu, 17 Jun 2021 10:52:50 +0200 Subject: oops uwu --- src/Body.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/Body.cpp b/src/Body.cpp index fa56ded..93b9c6f 100644 --- a/src/Body.cpp +++ b/src/Body.cpp @@ -1482,7 +1482,8 @@ namespace QuickMedia { const bool rendering_card_view = card_view && card_view_enabled; sf::Vector2i content_size = get_item_thumbnail_size(item); - if(draw_thumbnails && load_texture && !item->thumbnail_url.empty() && !merge_with_previous) { + const bool show_thumbnail = draw_thumbnails && !item->thumbnail_url.empty() && !merge_with_previous; + if(load_texture && show_thumbnail) { std::shared_ptr item_thumbnail = AsyncImageLoader::get_instance().get_thumbnail(item->thumbnail_url, item->thumbnail_is_local, content_size); content_size = clamp_to_size_x(content_size, sf::Vector2i(width - (rendering_card_view ? 0.0f : body_spacing[body_theme].image_padding_x * 2.0f), content_size.y)); @@ -1505,7 +1506,8 @@ namespace QuickMedia { item->loaded_image_size = to_vec2f(content_size); } } else if(item->thumbnail_size.x > 0) { - item->loaded_image_size = sf::Vector2f(body_spacing[body_theme].image_padding_x + content_size.x, 0.0f); + if(!show_thumbnail) + item->loaded_image_size.x = body_spacing[body_theme].image_padding_x + content_size.x; // TODO: Fix. This makes the body item have incorrect position when loading and if the item is merge_with_previous? and has an embedded item //if(!merge_with_previous) // image_height = content_size.y; -- cgit v1.2.3