From 0bda7f196d4050ec6d24d7a484bf05fc173d457f Mon Sep 17 00:00:00 2001 From: omar Date: Wed, 23 Jan 2019 13:03:59 +0100 Subject: [PATCH] Docking: Fixed overlapping issue with greyed out close button. --- imgui.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/imgui.cpp b/imgui.cpp index 54dbccb0..74229821 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -11561,8 +11561,8 @@ static ImRect ImGui::DockNodeCalcTabBarRect(const ImGuiDockNode* node) ImRect r = ImRect(node->Pos.x, node->Pos.y, node->Pos.x + node->Size.x, node->Pos.y + (g.FontSize + g.Style.FramePadding.y * 2.0f)); if (node->HasCollapseButton) r.Min.x += g.Style.FramePadding.x + g.FontSize; // + g.Style.ItemInnerSpacing.x; // <-- Adding ItemInnerSpacing makes the title text moves slightly when in a tab bar. Instead we adjusted RenderArrowDockMenu() - if (node->HasCloseButton) - r.Max.x -= g.Style.FramePadding.x + g.FontSize + 1.0f; + // In DockNodeUpdateTabBar() we currently display a disabled close button even if there is none. + r.Max.x -= g.Style.FramePadding.x + g.FontSize + 1.0f; return r; }