An attempt to fix sla gizmo imgui dialog scaling on osx and hidpi screens

This commit is contained in:
Lukas Matena 2019-03-06 09:15:33 +01:00
parent f147f192b4
commit 79fbf08409
2 changed files with 4 additions and 1 deletions

View file

@ -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));

View file

@ -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();