|
|
|
@ -4251,7 +4251,9 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Lock window padding so that altering the ShowBorders flag for children doesn't have side-effects.
|
|
|
|
|
window->WindowPadding = ((flags & ImGuiWindowFlags_ChildWindow) && !(flags & (ImGuiWindowFlags_AlwaysUseWindowPadding | ImGuiWindowFlags_ShowBorders | ImGuiWindowFlags_ComboBox | ImGuiWindowFlags_Popup))) ? ImVec2(0,0) : style.WindowPadding;
|
|
|
|
|
window->WindowPadding = style.WindowPadding;
|
|
|
|
|
if ((flags & ImGuiWindowFlags_ChildWindow) && !(flags & (ImGuiWindowFlags_AlwaysUseWindowPadding | ImGuiWindowFlags_ShowBorders | ImGuiWindowFlags_ComboBox | ImGuiWindowFlags_Popup)))
|
|
|
|
|
window->WindowPadding = ImVec2(0.0f, (flags & ImGuiWindowFlags_MenuBar) ? style.WindowPadding.y : 0.0f);
|
|
|
|
|
|
|
|
|
|
// Calculate auto-fit size, handle automatic resize
|
|
|
|
|
const ImVec2 size_auto_fit = CalcSizeAutoFit(window);
|
|
|
|
|