mirror of
https://github.com/Drezil/imgui.git
synced 2025-04-16 08:04: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
@ -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;
|
window->SizeFull.x = window->AutoFitOnlyGrows ? ImMax(window->SizeFull.x, size_auto_fit.x) : size_auto_fit.x;
|
||||||
if (window->AutoFitFramesY > 0)
|
if (window->AutoFitFramesY > 0)
|
||||||
window->SizeFull.y = window->AutoFitOnlyGrows ? ImMax(window->SizeFull.y, size_auto_fit.y) : size_auto_fit.y;
|
window->SizeFull.y = window->AutoFitOnlyGrows ? ImMax(window->SizeFull.y, size_auto_fit.y) : size_auto_fit.y;
|
||||||
window->Size = window->TitleBarRect().GetSize();
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -3971,16 +3970,12 @@ bool ImGui::Begin(const char* name, bool* p_open, const ImVec2& size_on_first_us
|
|||||||
if (!(flags & ImGuiWindowFlags_NoSavedSettings))
|
if (!(flags & ImGuiWindowFlags_NoSavedSettings))
|
||||||
MarkSettingsDirty();
|
MarkSettingsDirty();
|
||||||
}
|
}
|
||||||
window->Size = window->SizeFull;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Minimum window size
|
// Apply window size constraints and final size
|
||||||
if (!(flags & (ImGuiWindowFlags_ChildWindow | ImGuiWindowFlags_AlwaysAutoResize)))
|
if (!(flags & (ImGuiWindowFlags_ChildWindow | ImGuiWindowFlags_AlwaysAutoResize)))
|
||||||
{
|
|
||||||
window->SizeFull = ImMax(window->SizeFull, style.WindowMinSize);
|
window->SizeFull = ImMax(window->SizeFull, style.WindowMinSize);
|
||||||
if (!window->Collapsed)
|
window->Size = window->Collapsed ? window->TitleBarRect().GetSize() : window->SizeFull;
|
||||||
window->Size = window->SizeFull;
|
|
||||||
}
|
|
||||||
|
|
||||||
// POSITION
|
// POSITION
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user