Qt: Use same imgui style as SDL
This commit is contained in:
parent
e662f34f8b
commit
74e0e83cfd
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue