mirror of
https://github.com/ocornut/imgui.git
synced 2025-02-11 16:33:11 +01: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
|
// Minimum window size
|
||||||
if (!(flags & ImGuiWindowFlags_ChildWindow) && !(flags & ImGuiWindowFlags_Tooltip))
|
if (!(flags & ImGuiWindowFlags_ChildWindow) && !(flags & ImGuiWindowFlags_Tooltip))
|
||||||
|
{
|
||||||
window->SizeFull = ImMax(window->SizeFull, style.WindowMinSize);
|
window->SizeFull = ImMax(window->SizeFull, style.WindowMinSize);
|
||||||
|
if (!window->Collapsed)
|
||||||
|
window->Size = window->SizeFull;
|
||||||
|
}
|
||||||
|
|
||||||
// POSITION
|
// 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))
|
if ((flags & ImGuiWindowFlags_ChildWindow) && !(flags & ImGuiWindowFlags_Popup))
|
||||||
{
|
{
|
||||||
window->Pos = window->PosFloat = parent_window->DC.CursorPos;
|
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
|
// Position popup
|
||||||
|
Loading…
x
Reference in New Issue
Block a user