From 4039cfd66693c9675473395e148740f87984d215 Mon Sep 17 00:00:00 2001 From: "zhou.xu" Date: Sun, 23 Mar 2025 17:22:06 +0800 Subject: [PATCH] FIX:Icon is not visible in boolean in mac jira: STUDIO-11056 Change-Id: I80d2b04a0d82655aaee7a83c2ee211f48d9e6b7e --- src/slic3r/GUI/Gizmos/GLGizmoMeshBoolean.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/slic3r/GUI/Gizmos/GLGizmoMeshBoolean.cpp b/src/slic3r/GUI/Gizmos/GLGizmoMeshBoolean.cpp index bfcb4b2ba..c66d20a2a 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmoMeshBoolean.cpp +++ b/src/slic3r/GUI/Gizmos/GLGizmoMeshBoolean.cpp @@ -326,11 +326,13 @@ void GLGizmoMeshBoolean::on_render_input_window(float x, float y, float bottom_l ImGui::PushStyleColor(ImGuiCol_ButtonHovered, ImGui::GetStyleColorVec4(ImGuiCol_Button)); ImGui::PushStyleColor(ImGuiCol_ButtonHovered, ImGui::GetStyleColorVec4(ImGuiCol_Button)); ImGui::PushStyleColor(ImGuiCol_Border, { 0, 0, 0, 0 }); - if (ImGui::Button((into_u8(ImGui::TextSearchCloseIcon) + "##src").c_str(), {18, 18})) + ImGui::PushID("Source"); + if (ImGui::Button(into_u8(ImGui::TextSearchCloseIcon).c_str())) { m_src.reset(); m_selecting_state = MeshBooleanSelectingState::SelectSource; } + ImGui::PopID(); ImGui::PopStyleColor(5); } @@ -355,11 +357,13 @@ void GLGizmoMeshBoolean::on_render_input_window(float x, float y, float bottom_l ImGui::PushStyleColor(ImGuiCol_ButtonHovered, ImGui::GetStyleColorVec4(ImGuiCol_Button)); ImGui::PushStyleColor(ImGuiCol_ButtonHovered, ImGui::GetStyleColorVec4(ImGuiCol_Button)); ImGui::PushStyleColor(ImGuiCol_Border, { 0, 0, 0, 0 }); - if (ImGui::Button((into_u8(ImGui::TextSearchCloseIcon) + "tool").c_str(), {18, 18})) + ImGui::PushID("Tool"); + if (ImGui::Button(into_u8(ImGui::TextSearchCloseIcon).c_str())) { m_tool.reset(); m_selecting_state = (m_src.mv == nullptr) ? MeshBooleanSelectingState::SelectSource : MeshBooleanSelectingState::SelectTool; } + ImGui::PopID(); ImGui::PopStyleColor(5); m_full_width = ImGui::GetWindowWidth(); } else {