Qt: Use same imgui style as SDL

This commit is contained in:
Connor McLaughlin 2020-03-22 13:17:16 +10:00
parent e662f34f8b
commit 74e0e83cfd
1 changed files with 4 additions and 1 deletions

View File

@ -1,4 +1,5 @@
#include "qtdisplaywidget.h"
#include "frontend-common/imgui_styles.h"
#include "imgui.h"
#include "qthostinterface.h"
#include "qtutils.h"
@ -83,9 +84,11 @@ bool QtDisplayWidget::createImGuiContext()
const float framebuffer_scale = static_cast<float>(getDevicePixelRatioFromScreen());
io.DisplayFramebufferScale.x = framebuffer_scale;
io.DisplayFramebufferScale.y = framebuffer_scale;
io.FontGlobalScale = framebuffer_scale;
ImGui::GetStyle().ScaleAllSizes(framebuffer_scale);
ImGui::StyleColorsDarker();
ImGui::AddRobotoRegularFont(15.0f * framebuffer_scale);
return true;
}