diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Body.cpp | 8 | ||||
-rw-r--r-- | src/QuickMedia.cpp | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/Body.cpp b/src/Body.cpp index 4c1f95c..ffd9337 100644 --- a/src/Body.cpp +++ b/src/Body.cpp @@ -1103,7 +1103,7 @@ namespace QuickMedia { text_offset_x += body_spacing[body_theme].image_padding_x + thumbnail_size.x; } - const float text_offset_y = item_thumbnail ? std::floor(8.0f * get_ui_scale()) : std::floor(6.0f * get_ui_scale()); + const float text_offset_y = std::floor(6.0f * get_ui_scale()); const float timestamp_text_y = std::floor(item_pos.y + padding_y - text_offset_y); if(item->author_text && !merge_with_previous) { @@ -1184,7 +1184,7 @@ namespace QuickMedia { reaction.text->draw(window); if(text_offset_x + reaction_offset_x + reaction.text->getWidth() + body_spacing[body_theme].reaction_background_padding_x * 2.0f > size.x && i < (int)item->reactions.size() - 1) { reaction_offset_x = 0.0f; - item_pos.y += reaction.text->getHeight() + body_spacing[body_theme].reaction_padding_y + std::floor(8.0f * get_ui_scale()); + item_pos.y += reaction.text->getHeight() + body_spacing[body_theme].reaction_padding_y + text_offset_y; reaction_max_height = reaction.text->getHeight(); } } @@ -1208,7 +1208,7 @@ namespace QuickMedia { if(current_json.isNumeric() && total_json.isNumeric()) { progress_text.setString(std::string("Page: ") + std::to_string(current_json.asInt()) + "/" + std::to_string(total_json.asInt())); auto bounds = progress_text.getLocalBounds(); - progress_text.setPosition(std::floor(item_pos.x + size.x - bounds.width - body_spacing[body_theme].padding_x), timestamp_text_y + std::floor(8.0f * get_ui_scale())); + progress_text.setPosition(std::floor(item_pos.x + size.x - bounds.width - body_spacing[body_theme].padding_x), timestamp_text_y + text_offset_y); window.draw(progress_text); } } @@ -1283,7 +1283,7 @@ namespace QuickMedia { reaction_offset_x += reaction.text->getWidth() + body_spacing[body_theme].reaction_background_padding_x * 2.0f + body_spacing[body_theme].reaction_spacing_x; if(text_offset_x + reaction_offset_x + reaction.text->getWidth() + body_spacing[body_theme].reaction_background_padding_x * 2.0f > width && i < (int)item->reactions.size() - 1) { reaction_offset_x = 0.0f; - item_height += reaction.text->getHeight() + body_spacing[body_theme].reaction_padding_y + std::floor(8.0f * get_ui_scale()); + item_height += reaction.text->getHeight() + body_spacing[body_theme].reaction_padding_y + std::floor(6.0f * get_ui_scale()); reaction_max_height = reaction.text->getHeight(); } } diff --git a/src/QuickMedia.cpp b/src/QuickMedia.cpp index e4f152d..9670f68 100644 --- a/src/QuickMedia.cpp +++ b/src/QuickMedia.cpp @@ -5765,10 +5765,10 @@ namespace QuickMedia { auto room_avatar_texture_size = room_avatar_sprite.getTexture()->getSize(); room_avatar_texture_size.x *= room_avatar_sprite.getScale().x; room_avatar_texture_size.y *= room_avatar_sprite.getScale().y; - room_avatar_sprite.setPosition(body_pos.x, room_name_total_height * 0.5f - room_avatar_texture_size.y * 0.5f + 5.0f); + room_avatar_sprite.setPosition(body_pos.x + std::floor(10.0f * get_ui_scale()), room_name_total_height * 0.5f - room_avatar_texture_size.y * 0.5f + 5.0f); circle_mask_shader.setUniform("resolution", sf::Vector2f(room_avatar_texture_size.x, room_avatar_texture_size.y)); window.draw(room_avatar_sprite, &circle_mask_shader); - room_name_text_offset_x += room_avatar_texture_size.x + 10.0f; + room_name_text_offset_x += std::floor(10.0f * get_ui_scale()) + room_avatar_texture_size.x + 10.0f; } room_name_text.setPosition(body_pos.x + room_name_text_offset_x, room_name_text_padding_y); |