Docking: DockSpace() emits ItemSize() properly + dockspace demo (works now since 05a25e5f3)

This commit is contained in:
ocornut
2020-08-20 16:21:48 +02:00
parent ad8fdc917f
commit 9d20a5f0a5
2 changed files with 24 additions and 13 deletions

View File

@ -14183,6 +14183,7 @@ void ImGui::DockSpace(ImGuiID id, const ImVec2& size_arg, ImGuiDockNodeFlags fla
char title[256];
ImFormatString(title, IM_ARRAYSIZE(title), "%s/DockSpace_%08X", window->Name, id);
// FIXME-DOCK: What is the reason for not simply calling BeginChild()?
if (node->Windows.Size > 0 || node->IsSplitNode())
PushStyleColor(ImGuiCol_ChildBg, IM_COL32(0, 0, 0, 0));
PushStyleVar(ImGuiStyleVar_ChildBorderSize, 0.0f);
@ -14213,6 +14214,7 @@ void ImGui::DockSpace(ImGuiID id, const ImVec2& size_arg, ImGuiDockNodeFlags fla
g.WithinEndChild = true;
End();
ItemSize(size);
g.WithinEndChild = false;
}