mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 08:47:52 -06:00
Improvements of High DPI scaling on Windows.
This commit is contained in:
parent
045879f68a
commit
c9cd4818c7
9 changed files with 48 additions and 30 deletions
|
@ -299,9 +299,13 @@ int em_unit(wxWindow* win)
|
|||
{
|
||||
if (win)
|
||||
{
|
||||
Slic3r::GUI::DPIDialog* dlg = dynamic_cast<Slic3r::GUI::DPIDialog*>(Slic3r::GUI::find_toplevel_parent(win));
|
||||
wxTopLevelWindow *toplevel = Slic3r::GUI::find_toplevel_parent(win);
|
||||
Slic3r::GUI::DPIDialog* dlg = dynamic_cast<Slic3r::GUI::DPIDialog*>(toplevel);
|
||||
if (dlg)
|
||||
return dlg->em_unit();
|
||||
Slic3r::GUI::DPIFrame* frame = dynamic_cast<Slic3r::GUI::DPIFrame*>(toplevel);
|
||||
if (frame)
|
||||
return frame->em_unit();
|
||||
}
|
||||
|
||||
return Slic3r::GUI::wxGetApp().em_unit();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue