From 7ec159a58daf2d4669c73d1f1de2b5d920384991 Mon Sep 17 00:00:00 2001 From: QIDI TECH <893239786@qq.com> Date: Thu, 15 Jun 2023 10:20:55 +0800 Subject: [PATCH] fix font_size bug --- src/slic3r/GUI/GLCanvas3D.cpp | 2 +- src/slic3r/GUI/ImGuiWrapper.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/slic3r/GUI/GLCanvas3D.cpp b/src/slic3r/GUI/GLCanvas3D.cpp index 69715a8..f4fc022 100644 --- a/src/slic3r/GUI/GLCanvas3D.cpp +++ b/src/slic3r/GUI/GLCanvas3D.cpp @@ -5634,7 +5634,7 @@ void GLCanvas3D::_resize(unsigned int w, unsigned int h) auto *imgui = wxGetApp().imgui(); imgui->set_display_size(static_cast(w), static_cast(h)); - const float font_size = 1.5f * wxGetApp().em_unit(); + const float font_size = 1.7f * wxGetApp().em_unit(); #if ENABLE_RETINA_GL imgui->set_scaling(font_size, 1.0f, m_retina_helper->get_scale_factor()); #else diff --git a/src/slic3r/GUI/ImGuiWrapper.cpp b/src/slic3r/GUI/ImGuiWrapper.cpp index 5ad1fc1..c355874 100644 --- a/src/slic3r/GUI/ImGuiWrapper.cpp +++ b/src/slic3r/GUI/ImGuiWrapper.cpp @@ -229,7 +229,7 @@ void ImGuiWrapper::set_scaling(float font_size, float scale_style, float scale_b return; } - m_font_size = 1.05f * font_size; + m_font_size = font_size; ImGui::GetStyle().ScaleAllSizes(scale_style / m_style_scaling); m_style_scaling = scale_style;