瀏覽代碼

Windows: Fixed some auto-resizing path using style.WindowMinSize.x (instead of x/y). (#7106)

ocornut 1 年之前
父節點
當前提交
03298fe875
共有 2 個文件被更改,包括 3 次插入1 次删除
  1. 2 0
      docs/CHANGELOG.txt
  2. 1 1
      imgui.cpp

+ 2 - 0
docs/CHANGELOG.txt

@@ -55,6 +55,8 @@ Other changes:
 
 
 - Windows: BeginChild(): Fixed auto-resizing erroneously limiting size to host viewport
 - Windows: BeginChild(): Fixed auto-resizing erroneously limiting size to host viewport
   minus padding. There are no limit to a child width/height. (#7063) [@Devyre]
   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
 - 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)
   speed asymetry when (incorrectly) attempting to scroll by non-integer amount. (#6677)
 - Nav, IO: SetNextFrameWantCaptureKeyboard(false) calls are not overrided back to true when
 - Nav, IO: SetNextFrameWantCaptureKeyboard(false) calls are not overrided back to true when

+ 1 - 1
imgui.cpp

@@ -5674,7 +5674,7 @@ static inline ImVec2 CalcWindowMinSize(ImGuiWindow* window)
     {
     {
         ImGuiWindow* window_for_height = window;
         ImGuiWindow* window_for_height = window;
         size_min.x = ((window->Flags & ImGuiWindowFlags_AlwaysAutoResize) == 0) ? g.Style.WindowMinSize.x : 4.0f;
         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
         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;
     return size_min;