Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/supermerill/SuperSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Matena <lukasmatena@seznam.cz>2019-03-06 11:15:33 +0300
committerLukas Matena <lukasmatena@seznam.cz>2019-03-06 12:11:02 +0300
commit79fbf0840904f00f4915919bd7642bf5e60b0ad8 (patch)
treecec3d545ebb403f3cbe5ae5ab1954b2a23b7ecfa /src/slic3r
parentf147f192b4cb4d641538741c773d0ef3187fdd8c (diff)
An attempt to fix sla gizmo imgui dialog scaling on osx and hidpi screens
Diffstat (limited to 'src/slic3r')
-rw-r--r--src/slic3r/GUI/GLGizmo.cpp3
-rw-r--r--src/slic3r/GUI/ImGuiWrapper.hpp2
2 files changed, 4 insertions, 1 deletions
diff --git a/src/slic3r/GUI/GLGizmo.cpp b/src/slic3r/GUI/GLGizmo.cpp
index afffd670e..ec541b89e 100644
--- a/src/slic3r/GUI/GLGizmo.cpp
+++ b/src/slic3r/GUI/GLGizmo.cpp
@@ -2267,7 +2267,8 @@ void GLGizmoSlaSupports::on_render_input_window(float x, float y, float bottom_l
RENDER_AGAIN:
m_imgui->set_next_window_pos(x, y, ImGuiCond_Always);
- static const ImVec2 window_size(285.f, 260.f);
+ const float scaling = m_imgui->get_style_scaling();
+ const ImVec2 window_size(285.f * scaling, 260.f * scaling);
ImGui::SetNextWindowPos(ImVec2(x, y - std::max(0.f, y+window_size.y-bottom_limit) ));
ImGui::SetNextWindowSize(ImVec2(window_size));
diff --git a/src/slic3r/GUI/ImGuiWrapper.hpp b/src/slic3r/GUI/ImGuiWrapper.hpp
index 019bb610e..35d0b5636 100644
--- a/src/slic3r/GUI/ImGuiWrapper.hpp
+++ b/src/slic3r/GUI/ImGuiWrapper.hpp
@@ -42,6 +42,8 @@ public:
bool update_mouse_data(wxMouseEvent &evt);
bool update_key_data(wxKeyEvent &evt);
+ float get_style_scaling() const { return m_style_scaling; }
+
void new_frame();
void render();