GUI: finish lock layout

This commit is contained in:
tildearrow 2022-05-24 02:38:10 -05:00
parent eb926a668d
commit d490746325
5 changed files with 13 additions and 7 deletions

View file

@ -3909,6 +3909,8 @@ void ImGui::StartMouseMovingWindowOrNode(ImGuiWindow* window, ImGuiDockNode* nod
if (root_node->OnlyNodeWithWindows != node || root_node->CentralNode != NULL) // -V1051 PVS-Studio thinks node should be root_node and is wrong about that.
if (undock_floating_node || root_node->IsDockSpace())
can_undock_node = true;
if (node->MergedFlags & ImGuiDockNodeFlags_NoMove)
can_undock_node = false;
}
const bool clicked = IsMouseClicked(0);
@ -6122,7 +6124,7 @@ void ImGui::RenderWindowDecorations(ImGuiWindow* window, const ImRect& title_bar
// Docking: Unhide tab bar (small triangle in the corner), drag from small triangle to quickly undock
ImGuiDockNode* node = window->DockNode;
if (window->DockIsActive && node->IsHiddenTabBar() && !node->IsNoTabBar())
if (window->DockIsActive && node->IsHiddenTabBar() && !node->IsNoTabBar() && !(node->MergedFlags & ImGuiDockNodeFlags_NoMove))
{
float unhide_sz_draw = ImFloor(g.FontSize * 0.70f);
float unhide_sz_hit = ImFloor(g.FontSize * 0.55f);