diff options
author | dec05eba <dec05eba@protonmail.com> | 2021-03-28 20:27:17 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2021-03-28 20:27:17 +0200 |
commit | 7bd1092f7e472afb0568205cf402c7a739d69ff0 (patch) | |
tree | 8112533e736a36bed43e1e506d73a3cf6cb5a54d | |
parent | aa26d1733df9a9b53e702563dc730beae7e17be0 (diff) |
Matrix: align messages from users with no avatar to the same x as users with avatar
-rw-r--r-- | src/Body.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
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) |