mirror of
https://github.com/Drezil/imgui.git
synced 2024-11-23 12:27:01 +00:00
Fix for width of child windows with scrollbar (broken 376a6a5af0
)
This commit is contained in:
parent
221f36e116
commit
99e315d2b2
@ -3304,15 +3304,16 @@ bool ImGui::Begin(const char* name, bool* p_opened, const ImVec2& size_on_first_
|
|||||||
if ((flags & ImGuiWindowFlags_AlwaysAutoResize) != 0)
|
if ((flags & ImGuiWindowFlags_AlwaysAutoResize) != 0)
|
||||||
{
|
{
|
||||||
// Don't continuously mark settings as dirty, the size of the window doesn't need to be stored.
|
// Don't continuously mark settings as dirty, the size of the window doesn't need to be stored.
|
||||||
window->Size = window->SizeFull = size_auto_fit;
|
window->SizeFull = size_auto_fit;
|
||||||
}
|
}
|
||||||
else if (window->AutoFitFrames > 0)
|
else if (window->AutoFitFrames > 0)
|
||||||
{
|
{
|
||||||
// Auto-fit only grows during the first few frames
|
// Auto-fit only grows during the first few frames
|
||||||
window->Size = window->SizeFull = window->AutoFitOnlyGrows ? ImMax(window->SizeFull, size_auto_fit) : size_auto_fit;
|
window->SizeFull = window->AutoFitOnlyGrows ? ImMax(window->SizeFull, size_auto_fit) : size_auto_fit;
|
||||||
if (!(flags & ImGuiWindowFlags_NoSavedSettings))
|
if (!(flags & ImGuiWindowFlags_NoSavedSettings))
|
||||||
MarkSettingsDirty();
|
MarkSettingsDirty();
|
||||||
}
|
}
|
||||||
|
window->Size = window->SizeFull;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Draw window + handle manual resize
|
// Draw window + handle manual resize
|
||||||
|
Loading…
Reference in New Issue
Block a user