Hopefully fixed SLA dialog scaling issues on OSX

This commit is contained in:
Lukas Matena 2019-05-13 14:28:03 +02:00
parent 76c3da9aba
commit 1e99454602
2 changed files with 11 additions and 4 deletions

View file

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