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

This commit is contained in:
ocornut 2023-12-10 12:53:20 +01:00
parent 69f524ba95
commit 03298fe875
2 changed files with 3 additions and 1 deletions

View File

@ -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

View File

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