mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 16:57:53 -06:00
imgui: Refactor font size, font initialization
This commit is contained in:
parent
32a49d1468
commit
88cc93cdc9
4 changed files with 48 additions and 41 deletions
|
@ -4403,11 +4403,13 @@ void GLCanvas3D::_resize(unsigned int w, unsigned int h)
|
|||
if ((m_canvas == nullptr) && (m_context == nullptr))
|
||||
return;
|
||||
|
||||
wxGetApp().imgui()->set_display_size((float)w, (float)h);
|
||||
auto *imgui = wxGetApp().imgui();
|
||||
imgui->set_display_size((float)w, (float)h);
|
||||
imgui->set_font_size(m_canvas->GetFont().GetPixelSize().y);
|
||||
#if ENABLE_RETINA_GL
|
||||
wxGetApp().imgui()->set_style_scaling(m_retina_helper->get_scale_factor());
|
||||
imgui->set_style_scaling(m_retina_helper->get_scale_factor());
|
||||
#else
|
||||
wxGetApp().imgui()->set_style_scaling(m_canvas->GetContentScaleFactor());
|
||||
imgui->set_style_scaling(m_canvas->GetContentScaleFactor());
|
||||
#endif
|
||||
|
||||
// ensures that this canvas is current
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue