Columns: Added ImGuiColumnsFlags_GrowParentContentsSize to internal API to restore old content sizes behavior. (#1444, #125)

This commit is contained in:
omar
2017-11-16 17:34:34 +01:00
parent 29d962069d
commit 834fa52c8e
2 changed files with 4 additions and 2 deletions

View File

@ -10515,7 +10515,8 @@ void ImGui::EndColumns()
window->DC.ColumnsCellMaxY = ImMax(window->DC.ColumnsCellMaxY, window->DC.CursorPos.y);
window->DC.CursorPos.y = window->DC.ColumnsCellMaxY;
window->DC.CursorMaxPos.x = ImMax(window->DC.ColumnsStartMaxPosX, window->DC.ColumnsMaxX); // Columns don't grow parent
if (!(window->DC.ColumnsFlags & ImGuiColumnsFlags_GrowParentContentsSize))
window->DC.CursorMaxPos.x = ImMax(window->DC.ColumnsStartMaxPosX, window->DC.ColumnsMaxX); // Restore cursor max pos, as columns don't grow parent
// Draw columns borders and handle resize
if (!(window->DC.ColumnsFlags & ImGuiColumnsFlags_NoBorder) && !window->SkipItems)