Browse Source

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

pull/7111/head
ocornut 11 months ago
parent
commit
03298fe875
  1. 2
      docs/CHANGELOG.txt
  2. 2
      imgui.cpp

2
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

2
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;

Loading…
Cancel
Save