mirror of
https://github.com/Drezil/imgui.git
synced 2024-12-19 06:26:35 +00:00
Docking: Fixed overlapping issue with greyed out close button.
This commit is contained in:
parent
9f96fcff3c
commit
0bda7f196d
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user