mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-17 01:04:19 +00:00
Merge d55014fd8d into 84a9d532b6
This commit is contained in:
commit
518616bf91
3 changed files with 18 additions and 0 deletions
14
imgui.cpp
14
imgui.cpp
|
|
@ -3788,6 +3788,7 @@ const char* ImGui::GetStyleColorName(ImGuiCol idx)
|
|||
case ImGuiCol_ChildBg: return "ChildBg";
|
||||
case ImGuiCol_PopupBg: return "PopupBg";
|
||||
case ImGuiCol_Border: return "Border";
|
||||
case ImGuiCol_WindowBorderSelected: return "WindowBorderSelected";
|
||||
case ImGuiCol_BorderShadow: return "BorderShadow";
|
||||
case ImGuiCol_FrameBg: return "FrameBg";
|
||||
case ImGuiCol_FrameBgHovered: return "FrameBgHovered";
|
||||
|
|
@ -7577,6 +7578,19 @@ void ImGui::RenderWindowDecorations(ImGuiWindow* window, const ImRect& title_bar
|
|||
// Borders (for dock node host they will be rendered over after the tab bar)
|
||||
if (handle_borders_and_resize_grips && !window->DockNodeAsHost)
|
||||
RenderWindowOuterBorders(window);
|
||||
|
||||
// Selected border
|
||||
const float border_size = window->WindowBorderSize;
|
||||
bool is_window_selected = border_size > 0.0f && title_bar_is_highlight && !(window->Flags & (ImGuiWindowFlags_NoNavFocus | ImGuiWindowFlags_MenuBar));
|
||||
is_window_selected &= (!window->DockIsActive || window->DockNode->IsFocused);
|
||||
if (is_window_selected)
|
||||
{
|
||||
const ImU32 border_selected_col = GetColorU32(ImGuiCol_WindowBorderSelected);
|
||||
RenderWindowOuterSingleBorder(window, 0, border_selected_col, border_size);
|
||||
RenderWindowOuterSingleBorder(window, 1, border_selected_col, border_size);
|
||||
RenderWindowOuterSingleBorder(window, 2, border_selected_col, border_size);
|
||||
RenderWindowOuterSingleBorder(window, 3, border_selected_col, border_size);
|
||||
}
|
||||
}
|
||||
window->DC.NavLayerCurrent = ImGuiNavLayer_Main;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue