|
@@ -97,6 +97,10 @@ int main(int, char**)
|
|
ImGuiStyle& style = ImGui::GetStyle();
|
|
ImGuiStyle& style = ImGui::GetStyle();
|
|
style.ScaleAllSizes(main_scale); // Bake a fixed style scale. (until we have a solution for dynamic style scaling, changing this requires resetting Style + calling this again)
|
|
style.ScaleAllSizes(main_scale); // Bake a fixed style scale. (until we have a solution for dynamic style scaling, changing this requires resetting Style + calling this again)
|
|
style.FontScaleDpi = main_scale; // Set initial font scale. (using io.ConfigDpiScaleFonts=true makes this unnecessary. We leave both here for documentation purpose)
|
|
style.FontScaleDpi = main_scale; // Set initial font scale. (using io.ConfigDpiScaleFonts=true makes this unnecessary. We leave both here for documentation purpose)
|
|
|
|
+#if GLFW_VERSION_MAJOR >= 3 && GLFW_VERSION_MINOR >= 3
|
|
|
|
+ io.ConfigDpiScaleFonts = true; // [Experimental] Automatically overwrite style.FontScaleDpi in Begin() when Monitor DPI changes. This will scale fonts but _NOT_ scale sizes/padding for now.
|
|
|
|
+ io.ConfigDpiScaleViewports = true; // [Experimental] Scale Dear ImGui and Platform Windows when Monitor DPI changes.
|
|
|
|
+#endif
|
|
|
|
|
|
// When viewports are enabled we tweak WindowRounding/WindowBg so platform windows can look identical to regular ones.
|
|
// When viewports are enabled we tweak WindowRounding/WindowBg so platform windows can look identical to regular ones.
|
|
if (io.ConfigFlags & ImGuiConfigFlags_ViewportsEnable)
|
|
if (io.ConfigFlags & ImGuiConfigFlags_ViewportsEnable)
|