From 7bd1092f7e472afb0568205cf402c7a739d69ff0 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sun, 28 Mar 2021 20:27:17 +0200 Subject: Matrix: align messages from users with no avatar to the same x as users with avatar --- src/Body.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Body.cpp b/src/Body.cpp index a5a8eed..36c5b1b 100644 --- a/src/Body.cpp +++ b/src/Body.cpp @@ -1009,9 +1009,11 @@ namespace QuickMedia { window.draw(loading_icon); text_offset_x += image_padding_x + content_size.x; } - } else if(merge_with_previous && !item->thumbnail_url.empty()) { + } else if(merge_with_previous) { // TODO: Get the previous items text_offset_x instead of + 32.0f * get_ui_scale() text_offset_x += image_padding_x + (32.0f * get_ui_scale()); + } else if(item->thumbnail_size.x > 0) { + text_offset_x += image_padding_x + get_item_thumbnail_size(item).x; } const float timestamp_text_y = std::floor(item_pos.y + padding_y - std::floor(6.0f * get_ui_scale())); @@ -1172,6 +1174,8 @@ namespace QuickMedia { } else if(merge_with_previous) { // TODO: Get the previous items text_offset_x instead of + 32.0f * get_ui_scale() text_offset_x += image_padding_x + (32.0f * get_ui_scale()); + } else if(item->thumbnail_size.x > 0) { + text_offset_x += image_padding_x + get_item_thumbnail_size(item).x; } if(load_texture) -- cgit v1.2.3