1
0
mirror of https://github.com/ocornut/imgui.git synced 2024-11-12 10:11:00 +01:00

Window: fixed child window sizing lag + minimum size clamping lag

This commit is contained in:
ocornut 2015-05-15 21:40:45 +01:00
parent 70f83a3a65
commit c1b55991c0

View File

@ -3465,7 +3465,11 @@ bool ImGui::Begin(const char* name, bool* p_opened, const ImVec2& size_on_first_
// Minimum window size
if (!(flags & ImGuiWindowFlags_ChildWindow) && !(flags & ImGuiWindowFlags_Tooltip))
{
window->SizeFull = ImMax(window->SizeFull, style.WindowMinSize);
if (!window->Collapsed)
window->Size = window->SizeFull;
}
// POSITION
@ -3475,7 +3479,7 @@ bool ImGui::Begin(const char* name, bool* p_opened, const ImVec2& size_on_first_
if ((flags & ImGuiWindowFlags_ChildWindow) && !(flags & ImGuiWindowFlags_Popup))
{
window->Pos = window->PosFloat = parent_window->DC.CursorPos;
window->SizeFull = size_on_first_use; // NB: argument name 'size_on_first_use' misleading here, it's really just 'size' as provided by user.
window->Size = window->SizeFull = size_on_first_use; // NB: argument name 'size_on_first_use' misleading here, it's really just 'size' as provided by user.
}
// Position popup