mirror of
https://github.com/Drezil/imgui.git
synced 2024-11-15 01:17:00 +00:00
Window: fixed child window sizing lag + minimum size clamping lag
This commit is contained in:
parent
70f83a3a65
commit
c1b55991c0
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user