1
0
Fork 0
mirror of https://github.com/ocornut/imgui.git synced 2026-02-05 04:10:07 +00:00

Window: Fixed initial width of collapsed windows not taking account of contents width (broken in 1.67). (#2336, #176)

This commit is contained in:
omar 2019-02-08 14:34:42 +01:00
parent 1b63ded8fa
commit afc36cf802
2 changed files with 3 additions and 1 deletions

View file

@ -4558,7 +4558,8 @@ static ImVec2 CalcSizeAfterConstraint(ImGuiWindow* window, ImVec2 new_size)
static ImVec2 CalcSizeContents(ImGuiWindow* window)
{
if (window->Collapsed)
return window->SizeContents;
if (window->AutoFitFramesX <= 0 && window->AutoFitFramesY <= 0)
return window->SizeContents;
if (window->Hidden && window->HiddenFramesForResize == 0 && window->HiddenFramesRegular > 0)
return window->SizeContents;