From 03298fe875c0855097af6f79be631952054f984d Mon Sep 17 00:00:00 2001 From: ocornut Date: Sun, 10 Dec 2023 12:53:20 +0100 Subject: [PATCH] Windows: Fixed some auto-resizing path using style.WindowMinSize.x (instead of x/y). (#7106) --- docs/CHANGELOG.txt | 2 ++ imgui.cpp | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/CHANGELOG.txt b/docs/CHANGELOG.txt index ffd6394d2..0249fbe3e 100644 --- a/docs/CHANGELOG.txt +++ b/docs/CHANGELOG.txt @@ -55,6 +55,8 @@ Other changes: - Windows: BeginChild(): Fixed auto-resizing erroneously limiting size to host viewport minus padding. There are no limit to a child width/height. (#7063) [@Devyre] +- Windows: Fixed some auto-resizing path using style.WindowMinSize.x (instead of x/y) + for both axises since 1.90. (#7106) [@n0bodysec] - Scrolling: internal scrolling value is rounded instead of truncated, as a way to reduce speed asymetry when (incorrectly) attempting to scroll by non-integer amount. (#6677) - Nav, IO: SetNextFrameWantCaptureKeyboard(false) calls are not overrided back to true when diff --git a/imgui.cpp b/imgui.cpp index 10ccf0222..2a3b25bc3 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -5674,7 +5674,7 @@ static inline ImVec2 CalcWindowMinSize(ImGuiWindow* window) { ImGuiWindow* window_for_height = window; size_min.x = ((window->Flags & ImGuiWindowFlags_AlwaysAutoResize) == 0) ? g.Style.WindowMinSize.x : 4.0f; - size_min.y = ((window->Flags & ImGuiWindowFlags_AlwaysAutoResize) == 0) ? g.Style.WindowMinSize.x : 4.0f; + size_min.y = ((window->Flags & ImGuiWindowFlags_AlwaysAutoResize) == 0) ? g.Style.WindowMinSize.y : 4.0f; size_min.y = ImMax(size_min.y, window_for_height->TitleBarHeight() + window_for_height->MenuBarHeight() + ImMax(0.0f, g.Style.WindowRounding - 1.0f)); // Reduce artifacts with very small windows } return size_min;