From e4cfd78e2c9bf16d55c3577dcf8c2266d0ae0e5e Mon Sep 17 00:00:00 2001 From: "zhou.xu" Date: Tue, 28 Nov 2023 10:35:11 +0800 Subject: [PATCH] FIX:cancel the variable of "checkbox_size" as a fixed value Jira: STUDIO-5150 Change-Id: I30d876d141b8b35ab4a3fee4889993d87b7c1741 --- src/slic3r/GUI/Gizmos/GLGizmoAdvancedCut.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/slic3r/GUI/Gizmos/GLGizmoAdvancedCut.cpp b/src/slic3r/GUI/Gizmos/GLGizmoAdvancedCut.cpp index 24ec37d6e..07c4ab523 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmoAdvancedCut.cpp +++ b/src/slic3r/GUI/Gizmos/GLGizmoAdvancedCut.cpp @@ -1974,7 +1974,11 @@ void GLGizmoAdvancedCut::render_cut_plane_input_window(float x, float y, float b m_is_slider_editing_done = false; m_imgui->text(_L("Groove") + ": "); // ImGuiWrapper::text_colored(ImGuiWrapper::COL_ORANGE_LIGHT, m_labels_map["Groove"] + ": "); m_label_width = caption_size + 1 * space_size; - m_editing_window_width = m_label_width* 2.5; +#ifdef __APPLE__ + m_editing_window_width = m_label_width * 2.9; +#else + m_editing_window_width = m_label_width * 2.5; +#endif bool is_changed{false}; is_changed |= render_slider_double_input(_u8L("Depth"), m_groove.depth, m_groove.depth_tolerance); is_changed |= render_slider_double_input(_u8L("Width"), m_groove.width, m_groove.width_tolerance); @@ -2006,14 +2010,10 @@ void GLGizmoAdvancedCut::render_cut_plane_input_window(float x, float y, float b m_imgui->disabled_begin(!keep_part || m_cut_to_parts); float text_size = m_imgui->calc_text_size(text).x; -#ifdef __APPLE__ - text_size += m_imgui->scaled(2.0f); -#else text_size += m_imgui->scaled(2.5f); - #endif - float checkbox_size = 15; + float checkbox_size = m_imgui->calc_text_size(text).y; - float new_label_width = checkbox_size + text_size +2* space_size; + float new_label_width = checkbox_size + text_size + 2 * space_size; ImGui::SameLine(new_label_width); bool is_keep = !place_on_cut_part && !rotate_part; if (m_imgui->bbl_checkbox(_L("Keep orientation") + suffix, is_keep)){