mirror of
https://github.com/Drezil/imgui.git
synced 2024-11-15 01:17:00 +00:00
Minor sizing refactor, should be no-op. Making it a commit for further bisection since sizing code is super brittle. (#668)
This commit is contained in:
parent
102d03a7eb
commit
713730af0c
11
imgui.cpp
11
imgui.cpp
@ -3953,7 +3953,6 @@ bool ImGui::Begin(const char* name, bool* p_open, const ImVec2& size_on_first_us
|
||||
window->SizeFull.x = window->AutoFitOnlyGrows ? ImMax(window->SizeFull.x, size_auto_fit.x) : size_auto_fit.x;
|
||||
if (window->AutoFitFramesY > 0)
|
||||
window->SizeFull.y = window->AutoFitOnlyGrows ? ImMax(window->SizeFull.y, size_auto_fit.y) : size_auto_fit.y;
|
||||
window->Size = window->TitleBarRect().GetSize();
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -3971,17 +3970,13 @@ bool ImGui::Begin(const char* name, bool* p_open, const ImVec2& size_on_first_us
|
||||
if (!(flags & ImGuiWindowFlags_NoSavedSettings))
|
||||
MarkSettingsDirty();
|
||||
}
|
||||
window->Size = window->SizeFull;
|
||||
}
|
||||
|
||||
// Minimum window size
|
||||
// Apply window size constraints and final size
|
||||
if (!(flags & (ImGuiWindowFlags_ChildWindow | ImGuiWindowFlags_AlwaysAutoResize)))
|
||||
{
|
||||
window->SizeFull = ImMax(window->SizeFull, style.WindowMinSize);
|
||||
if (!window->Collapsed)
|
||||
window->Size = window->SizeFull;
|
||||
}
|
||||
|
||||
window->Size = window->Collapsed ? window->TitleBarRect().GetSize() : window->SizeFull;
|
||||
|
||||
// POSITION
|
||||
|
||||
// Position child window
|
||||
|
Loading…
Reference in New Issue
Block a user