Docking: fixed various rendering issues and ability to have rounded floating dock nodes. Amend 91ce8cc. (#6993, #6151)

This commit is contained in:
ocornut
2026-01-29 19:14:48 +01:00
parent 10ebda0b5e
commit f58378711f

View File

@@ -8219,10 +8219,12 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags)
// Lock window rounding for the frame (so that altering them doesn't cause inconsistencies)
// Large values tend to lead to variety of artifacts and are not recommended.
if (window->RootWindowDockTree->ViewportOwned)
if ((flags & ImGuiWindowFlags_ChildWindow) && !window->DockIsActive)
window->WindowRounding = style.ChildRounding;
else if (window->RootWindowDockTree->ViewportOwned)
window->WindowRounding = 0.0f;
else
window->WindowRounding = ((flags & ImGuiWindowFlags_ChildWindow) && !window->DockIsActive) ? style.ChildRounding : ((flags & ImGuiWindowFlags_Popup) && !(flags & ImGuiWindowFlags_Modal)) ? style.PopupRounding : style.WindowRounding;
window->WindowRounding = ((flags & ImGuiWindowFlags_Popup) && !(flags & ImGuiWindowFlags_Modal)) ? style.PopupRounding : style.WindowRounding;
// For windows with title bar or menu bar, we clamp to FrameHeight(FontSize + FramePadding.y * 2.0f) to completely hide artifacts.
//if ((window->Flags & ImGuiWindowFlags_MenuBar) || !(window->Flags & ImGuiWindowFlags_NoTitleBar))