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
This commit is contained in:
Hotsolidinfill 2023-08-28 20:39:19 +09:00 committed by GitHub
parent 3b73cc403b
commit 6710d1845d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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);