mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-04 03:58:47 +02:00
Docking: docked windows honor ImGuiCol_WindowBg. Host window in charge of rendering seams. (#2700, #2539 + Docked windows honor display their border properly. (#2522)
Plus: better support for transparent one in nodes Side effects: DockContextBindNodeToWindow doesn't alter node->IsVisible. Side effects: ImDrawList:: _ResetForNewFrame() needs to merge, sane (in case of (Amended, force-pushed)
This commit is contained in:
@ -1435,7 +1435,7 @@ void ImGui::Separator()
|
||||
}
|
||||
|
||||
// Using 'hover_visibility_delay' allows us to hide the highlight and mouse cursor for a short time, which can be convenient to reduce visual noise.
|
||||
bool ImGui::SplitterBehavior(const ImRect& bb, ImGuiID id, ImGuiAxis axis, float* size1, float* size2, float min_size1, float min_size2, float hover_extend, float hover_visibility_delay)
|
||||
bool ImGui::SplitterBehavior(const ImRect& bb, ImGuiID id, ImGuiAxis axis, float* size1, float* size2, float min_size1, float min_size2, float hover_extend, float hover_visibility_delay, ImU32 bg_col)
|
||||
{
|
||||
ImGuiContext& g = *GImGui;
|
||||
ImGuiWindow* window = g.CurrentWindow;
|
||||
@ -1487,7 +1487,9 @@ bool ImGui::SplitterBehavior(const ImRect& bb, ImGuiID id, ImGuiAxis axis, float
|
||||
}
|
||||
}
|
||||
|
||||
// Render
|
||||
// Render at new position
|
||||
if (bg_col & IM_COL32_A_MASK)
|
||||
window->DrawList->AddRectFilled(bb_render.Min, bb_render.Max, bg_col, 0.0f);
|
||||
const ImU32 col = GetColorU32(held ? ImGuiCol_SeparatorActive : (hovered && g.HoveredIdTimer >= hover_visibility_delay) ? ImGuiCol_SeparatorHovered : ImGuiCol_Separator);
|
||||
window->DrawList->AddRectFilled(bb_render.Min, bb_render.Max, col, 0.0f);
|
||||
|
||||
|
Reference in New Issue
Block a user