Skip to content

Commit 99e315d

Browse files
committed
Fix for width of child windows with scrollbar (broken 376a6a5)
1 parent 221f36e commit 99e315d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

imgui.cpp

+3-2
Original file line numberDiff line numberDiff line change
@@ -3304,15 +3304,16 @@ bool ImGui::Begin(const char* name, bool* p_opened, const ImVec2& size_on_first_
33043304
if ((flags & ImGuiWindowFlags_AlwaysAutoResize) != 0)
33053305
{
33063306
// Don't continuously mark settings as dirty, the size of the window doesn't need to be stored.
3307-
window->Size = window->SizeFull = size_auto_fit;
3307+
window->SizeFull = size_auto_fit;
33083308
}
33093309
else if (window->AutoFitFrames > 0)
33103310
{
33113311
// Auto-fit only grows during the first few frames
3312-
window->Size = window->SizeFull = window->AutoFitOnlyGrows ? ImMax(window->SizeFull, size_auto_fit) : size_auto_fit;
3312+
window->SizeFull = window->AutoFitOnlyGrows ? ImMax(window->SizeFull, size_auto_fit) : size_auto_fit;
33133313
if (!(flags & ImGuiWindowFlags_NoSavedSettings))
33143314
MarkSettingsDirty();
33153315
}
3316+
window->Size = window->SizeFull;
33163317
}
33173318

33183319
// Draw window + handle manual resize

0 commit comments

Comments
 (0)