mirror of
https://github.com/Drezil/imgui.git
synced 2024-11-15 09:27:00 +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));
|
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)
|
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()
|
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)
|
// 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;
|
r.Max.x -= g.Style.FramePadding.x + g.FontSize + 1.0f;
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user