From 65fd232e102ff89564d5417771e94bed3d1d31c7 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Thu, 18 Nov 2021 00:01:19 +0100 Subject: Fix window not being visible on kde because color map is deleted while the window is in use, text editing not working for the first character --- src/Body.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/Body.cpp') diff --git a/src/Body.cpp b/src/Body.cpp index d8e4acd..cc0f66c 100644 --- a/src/Body.cpp +++ b/src/Body.cpp @@ -1453,12 +1453,12 @@ namespace QuickMedia { window.draw(border_left); if(item->embedded_item) { - mgl::vec2f embedded_item_pos(std::floor(item_pos.x + text_offset_x + embedded_item_border_width + body_spacing[body_theme].padding_x), std::floor(item_pos.y + body_spacing[body_theme].embedded_item_padding_y + 6.0f)); + mgl::vec2f embedded_item_pos(std::floor(item_pos.x + text_offset_x + embedded_item_border_width + body_spacing[body_theme].padding_x), std::floor(item_pos.y + body_spacing[body_theme].embedded_item_padding_y)); mgl::vec2f embedded_item_size(embedded_item_width, embedded_item_height); draw_item(window, item->embedded_item, embedded_item_pos, embedded_item_size, false, true); } else { embedded_item_load_text.set_string(embedded_item_status_to_string(item->embedded_item_status)); - embedded_item_load_text.set_position(vec2f_floor(item_pos.x + text_offset_x + embedded_item_border_width + body_spacing[body_theme].padding_x, item_pos.y + embedded_item_height * 0.5f - (body_spacing[body_theme].embedded_item_font_size + 5.0f) * 0.5f + 6.0f)); + embedded_item_load_text.set_position(vec2f_floor(item_pos.x + text_offset_x + embedded_item_border_width + body_spacing[body_theme].padding_x, item_pos.y + embedded_item_height * 0.5f - (body_spacing[body_theme].embedded_item_font_size + 5.0f) * 0.5f)); window.draw(embedded_item_load_text); } item_pos.y += embedded_item_height + 4.0f; @@ -1662,9 +1662,9 @@ namespace QuickMedia { if(include_embedded_item && item->embedded_item_status != FetchStatus::NONE) { const float embedded_item_width = std::floor(width - text_offset_x - embedded_item_border_width - body_spacing[body_theme].padding_x); if(item->embedded_item) - item_height += (get_item_height(item->embedded_item.get(), embedded_item_width, load_texture, false) + 6.0f + body_spacing[body_theme].embedded_item_padding_y * 2.0f); + item_height += (get_item_height(item->embedded_item.get(), embedded_item_width, load_texture, false) + body_spacing[body_theme].embedded_item_padding_y * 2.0f); else - item_height += ((body_spacing[body_theme].embedded_item_font_size + 5.0f) + 6.0f + body_spacing[body_theme].embedded_item_padding_y * 2.0f); + item_height += ((body_spacing[body_theme].embedded_item_font_size + 5.0f) + body_spacing[body_theme].embedded_item_padding_y * 2.0f); has_loaded_text = true; // TODO: Remove this } if(item->description_text) { -- cgit v1.2.3