Docking: child windows don't use style.ChildRounding.

This commit is contained in:
omar 2019-10-25 11:13:51 +02:00
parent 0cbb96895a
commit 664fb38e39

View File

@ -6088,9 +6088,10 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags)
window->Pos = ImFloor(window->Pos); window->Pos = ImFloor(window->Pos);
// Lock window rounding for the frame (so that altering them doesn't cause inconsistencies) // Lock window rounding for the frame (so that altering them doesn't cause inconsistencies)
window->WindowRounding = (flags & ImGuiWindowFlags_ChildWindow) ? style.ChildRounding : ((flags & ImGuiWindowFlags_Popup) && !(flags & ImGuiWindowFlags_Modal)) ? style.PopupRounding : style.WindowRounding; if (window->ViewportOwned || window->DockIsActive)
if (window->ViewportOwned)
window->WindowRounding = 0.0f; window->WindowRounding = 0.0f;
else
window->WindowRounding = (flags & ImGuiWindowFlags_ChildWindow) ? style.ChildRounding : ((flags & ImGuiWindowFlags_Popup) && !(flags & ImGuiWindowFlags_Modal)) ? style.PopupRounding : style.WindowRounding;
// Apply window focus (new and reactivated windows are moved to front) // Apply window focus (new and reactivated windows are moved to front)
bool want_focus = false; bool want_focus = false;