diff options
author | Lukas Matena <lukasmatena@seznam.cz> | 2019-05-13 15:28:03 +0300 |
---|---|---|
committer | Lukas Matena <lukasmatena@seznam.cz> | 2019-05-13 16:10:01 +0300 |
commit | 1e99454602e52cc6e8f4264b0f22ec60355fb0af (patch) | |
tree | 660083c336644ce74d5c906edc5f438e040504c7 /src/slic3r/GUI/ImGuiWrapper.cpp | |
parent | 76c3da9aba4aba8fd45c4d81e029d682bf63aacd (diff) |
Hopefully fixed SLA dialog scaling issues on OSX
Diffstat (limited to 'src/slic3r/GUI/ImGuiWrapper.cpp')
-rw-r--r-- | src/slic3r/GUI/ImGuiWrapper.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/slic3r/GUI/ImGuiWrapper.cpp b/src/slic3r/GUI/ImGuiWrapper.cpp index 03c83cf51..8221a45cf 100644 --- a/src/slic3r/GUI/ImGuiWrapper.cpp +++ b/src/slic3r/GUI/ImGuiWrapper.cpp @@ -186,7 +186,14 @@ void ImGuiWrapper::render() ImVec2 ImGuiWrapper::calc_text_size(const wxString &text) { auto text_utf8 = into_u8(text); - return ImGui::CalcTextSize(text_utf8.c_str()); + ImVec2 size = ImGui::CalcTextSize(text_utf8.c_str()); + +#ifndef __APPLE__ + size.x *= m_style_scaling; + size.y *= m_style_scaling; +#endif + + return size; } void ImGuiWrapper::set_next_window_pos(float x, float y, int flag) |