From 6710d1845d6cd750016c572ac2220491e0970d26 Mon Sep 17 00:00:00 2001 From: Hotsolidinfill <138652683+Hotsolidinfill@users.noreply.github.com> Date: Mon, 28 Aug 2023 20:39:19 +0900 Subject: [PATCH] Fixed viewer resize malfunction when cjk language is use (#1909) * Update Korean translation * 1. Fix blank button text after translation 2. Fix some mistranslated korean * -fix bottom surface in gcode viewer -update korean translation * - Fixed UI being broken 'cause "display" text size could not be calculated when cjk language is use --- src/slic3r/GUI/GCodeViewer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/slic3r/GUI/GCodeViewer.cpp b/src/slic3r/GUI/GCodeViewer.cpp index 213b3099ab..0a81eb00b1 100644 --- a/src/slic3r/GUI/GCodeViewer.cpp +++ b/src/slic3r/GUI/GCodeViewer.cpp @@ -4462,7 +4462,7 @@ void GCodeViewer::render_legend(float &legend_height, int canvas_width, int canv if (b_menu_item) callback(); if (checkbox) { - ImGui::SameLine(ImGui::GetWindowWidth() - imgui.calc_text_size(_u8L("Display")).x / 2 - ImGui::GetFrameHeight() / 2 - 2 * window_padding); + ImGui::SameLine(ImGui::GetWindowWidth() - ImGui::CalcTextSize(_u8L("Display").c_str()).x / 2 - ImGui::GetFrameHeight() / 2 - 2 * window_padding); ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, ImVec2(0.0, 0.0)); ImGui::PushStyleColor(ImGuiCol_CheckMark, ImVec4(0.00f, 0.59f, 0.53f, 1.00f)); ImGui::Checkbox(("##" + columns_offsets[0].first).c_str(), &visible);