mirror of
https://github.com/ocornut/imgui.git
synced 2026-02-01 17:44:33 +00:00
Windows: shallow tweaks in window bg rendering to simplify diff w/ docking.
This commit is contained in:
@@ -7129,7 +7129,13 @@ void ImGui::RenderWindowDecorations(ImGuiWindow* window, const ImRect& title_bar
|
||||
}
|
||||
if (override_alpha)
|
||||
bg_col = (bg_col & ~IM_COL32_A_MASK) | (IM_F32_TO_INT8_SAT(alpha) << IM_COL32_A_SHIFT);
|
||||
window->DrawList->AddRectFilled(window->Pos + ImVec2(0, window->TitleBarHeight), window->Pos + window->Size, bg_col, window_rounding, (flags & ImGuiWindowFlags_NoTitleBar) ? 0 : ImDrawFlags_RoundCornersBottom);
|
||||
if (bg_col & IM_COL32_A_MASK)
|
||||
{
|
||||
ImRect bg_rect(window->Pos + ImVec2(0, window->TitleBarHeight), window->Pos + window->Size);
|
||||
ImDrawFlags bg_rounding_flags = (flags & ImGuiWindowFlags_NoTitleBar) ? 0 : ImDrawFlags_RoundCornersBottom;
|
||||
ImDrawList* bg_draw_list = window->DrawList;
|
||||
bg_draw_list->AddRectFilled(bg_rect.Min, bg_rect.Max, bg_col, window_rounding, bg_rounding_flags);
|
||||
}
|
||||
}
|
||||
|
||||
// Title bar
|
||||
@@ -12781,6 +12787,7 @@ void ImGui::BringWindowToFocusFront(ImGuiWindow* window)
|
||||
}
|
||||
|
||||
// Note technically focus related but rather adjacent and close to BringWindowToFocusFront()
|
||||
// FIXME-FOCUS: Could opt-in/opt-out enable modal check like in FocusWindow().
|
||||
void ImGui::BringWindowToDisplayFront(ImGuiWindow* window)
|
||||
{
|
||||
ImGuiContext& g = *GImGui;
|
||||
|
||||
Reference in New Issue
Block a user