mirror of
https://github.com/ocornut/imgui.git
synced 2025-09-19 17:58:26 +00:00
Docking, Style: added style.DockingNodeHasCloseButton option to hide the CloseButton() attached to each docking node. (#8933)
This commit is contained in:
@@ -1467,6 +1467,7 @@ ImGuiStyle::ImGuiStyle()
|
||||
SeparatorTextPadding = ImVec2(20.0f,3.f);// Horizontal offset of text from each edge of the separator + spacing on other axis. Generally small values. .y is recommended to be == FramePadding.y.
|
||||
DisplayWindowPadding = ImVec2(19,19); // Window position are clamped to be visible within the display area or monitors by at least this amount. Only applies to regular windows.
|
||||
DisplaySafeAreaPadding = ImVec2(3,3); // If you cannot see the edge of your screen (e.g. on a TV) increase the safe area padding. Covers popups/tooltips as well regular windows.
|
||||
DockingNodeHasCloseButton = true; // Docking nodes have their own CloseButton() to close all docked windows.
|
||||
DockingSeparatorSize = 2.0f; // Thickness of resizing border between docked windows
|
||||
MouseCursorScale = 1.0f; // Scale software rendered mouse cursor (when io.MouseDrawCursor is enabled). May be removed later.
|
||||
AntiAliasedLines = true; // Enable anti-aliased lines/borders. Disable if you are really tight on CPU/GPU.
|
||||
@@ -18647,7 +18648,7 @@ static void ImGui::DockNodeUpdate(ImGuiDockNode* node)
|
||||
node->HasCloseButton |= window->HasCloseButton;
|
||||
window->DockIsActive = (node->Windows.Size > 1);
|
||||
}
|
||||
if (node_flags & ImGuiDockNodeFlags_NoCloseButton)
|
||||
if ((node_flags & ImGuiDockNodeFlags_NoCloseButton) || !g.Style.DockingNodeHasCloseButton)
|
||||
node->HasCloseButton = false;
|
||||
|
||||
// Bind or create host window
|
||||
|
Reference in New Issue
Block a user