mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-30 03:10:06 +00:00
Added ImGuiWindowFlags_AlwaysUseWindowPadding flag to ensure non-border child window uses window padding (#462)
This commit is contained in:
parent
8e353af1d3
commit
07df3cfb3e
2 changed files with 2 additions and 1 deletions
|
|
@ -3766,7 +3766,7 @@ bool ImGui::Begin(const char* name, bool* p_opened, const ImVec2& size_on_first_
|
|||
}
|
||||
|
||||
// Lock window padding so that altering the ShowBorders flag for children doesn't have side-effects.
|
||||
window->WindowPadding = ((flags & ImGuiWindowFlags_ChildWindow) && !(flags & (ImGuiWindowFlags_ShowBorders | ImGuiWindowFlags_ComboBox | ImGuiWindowFlags_Popup))) ? ImVec2(0,0) : style.WindowPadding;
|
||||
window->WindowPadding = ((flags & ImGuiWindowFlags_ChildWindow) && !(flags & (ImGuiWindowFlags_AlwaysUseWindowPadding | ImGuiWindowFlags_ShowBorders | ImGuiWindowFlags_ComboBox | ImGuiWindowFlags_Popup))) ? ImVec2(0,0) : style.WindowPadding;
|
||||
|
||||
// Calculate auto-fit size
|
||||
ImVec2 size_auto_fit;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue