diff --git a/src/dusk/imgui/ImGuiConsole.cpp b/src/dusk/imgui/ImGuiConsole.cpp index 6a06fce882..c3d84b375e 100644 --- a/src/dusk/imgui/ImGuiConsole.cpp +++ b/src/dusk/imgui/ImGuiConsole.cpp @@ -23,7 +23,7 @@ using namespace std::string_literals; using namespace std::string_view_literals; namespace dusk { - float ImGuiScale() { return ImGui::GetIO().DisplayFramebufferScale.x; } + float ImGuiScale() { return 1.0f; } void ImGuiStringViewText(std::string_view text) { // begin()/end() do not work on MSVC diff --git a/src/dusk/imgui/ImGuiEngine.cpp b/src/dusk/imgui/ImGuiEngine.cpp index 4e2097cf3d..a6abc5b0b9 100644 --- a/src/dusk/imgui/ImGuiEngine.cpp +++ b/src/dusk/imgui/ImGuiEngine.cpp @@ -38,6 +38,7 @@ void ImGuiEngine_Initialize(float scale) { ImGui::GetCurrentContext(); ImGuiIO& io = ImGui::GetIO(); io.Fonts->Clear(); + io.FontGlobalScale = scale > 0.0f ? 1.0f / scale : 1.0f; const std::string fontPath = GetAssetPath("NotoMono-Regular.ttf"); const bool hasFontFile = AssetExists(fontPath); @@ -146,7 +147,6 @@ void ImGuiEngine_Initialize(float scale) { colors[ImGuiCol_NavWindowingDimBg] = ImVec4(0.80f, 0.80f, 0.80f, 0.20f); colors[ImGuiCol_ModalWindowDimBg] = ImVec4(0.80f, 0.80f, 0.80f, 0.35f); - style.ScaleAllSizes(scale); } Icon GetIcon() {