mirror of
https://github.com/Drezil/imgui.git
synced 2024-11-15 01:17:00 +00:00
Fix window size after collapsing (broken 376a6a5af0
)
This commit is contained in:
parent
7fac4013a4
commit
81bf614821
@ -3349,7 +3349,7 @@ bool ImGui::Begin(const char* name, bool* p_opened, const ImVec2& size_on_first_
|
||||
if (g.HoveredWindow == window && held && g.IO.MouseDoubleClicked[0])
|
||||
{
|
||||
// Manual auto-fit when double-clicking
|
||||
window->Size = window->SizeFull = size_auto_fit;
|
||||
window->SizeFull = size_auto_fit;
|
||||
if (!(window->Flags & ImGuiWindowFlags_NoSavedSettings))
|
||||
MarkSettingsDirty();
|
||||
SetActiveId(0);
|
||||
@ -3357,10 +3357,12 @@ bool ImGui::Begin(const char* name, bool* p_opened, const ImVec2& size_on_first_
|
||||
else if (held)
|
||||
{
|
||||
// Resize
|
||||
window->Size = window->SizeFull = ImMax(window->SizeFull + g.IO.MouseDelta, style.WindowMinSize);
|
||||
window->SizeFull = ImMax(window->SizeFull + g.IO.MouseDelta, style.WindowMinSize);
|
||||
if (!(window->Flags & ImGuiWindowFlags_NoSavedSettings))
|
||||
MarkSettingsDirty();
|
||||
}
|
||||
|
||||
window->Size = window->SizeFull;
|
||||
title_bar_rect = window->TitleBarRect();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user