diff options
author | dec05eba <dec05eba@protonmail.com> | 2021-06-17 10:52:50 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2021-06-17 10:52:50 +0200 |
commit | 4b99e44bfc320d01f6727c85be878bb72eb12257 (patch) | |
tree | 0f7ec1339a6290e7b800dc56b07ebb43d064f6cd /src | |
parent | d0f54de4520990c8465bf2b78a1ce8c0161d46d7 (diff) |
oops uwu
Diffstat (limited to 'src')
-rw-r--r-- | src/Body.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
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<ThumbnailData> 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; |