From 2523c197bc0c91d5aeb16131b0b0fd300a11bb06 Mon Sep 17 00:00:00 2001 From: David Maas Date: Sat, 30 Dec 2023 17:45:25 -0600 Subject: [PATCH] Fixed title bar background alpha being used to render viewport-owned windows. (#7184, #7181) --- docs/CHANGELOG.txt | 1 + imgui.cpp | 2 ++ 2 files changed, 3 insertions(+) diff --git a/docs/CHANGELOG.txt b/docs/CHANGELOG.txt index 6cf2c5d6..8fcd87f4 100644 --- a/docs/CHANGELOG.txt +++ b/docs/CHANGELOG.txt @@ -97,6 +97,7 @@ Docking+Viewports Branch: - Backends: DX12: Changed swapchain scaling mode to DXGI_SCALING_NONE to reduce artifacts as queued frames aren't synchronized with platform window resizes. (#7152, #7153) [@SuperWangKai] +- Windows: Fixed ImGuiCol_TitleBg/Active alpha being used for viewport-owned windows. (#7181) [@PathogenDavid] ----------------------------------------------------------------------- diff --git a/imgui.cpp b/imgui.cpp index 268cee61..b3a6dcb0 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -6492,6 +6492,8 @@ void ImGui::RenderWindowDecorations(ImGuiWindow* window, const ImRect& title_bar if (!(flags & ImGuiWindowFlags_NoTitleBar) && !window->DockIsActive) { ImU32 title_bar_col = GetColorU32(title_bar_is_highlight ? ImGuiCol_TitleBgActive : ImGuiCol_TitleBg); + if (window->ViewportOwned) + title_bar_col |= IM_COL32_A_MASK; // No alpha window->DrawList->AddRectFilled(title_bar_rect.Min, title_bar_rect.Max, title_bar_col, window_rounding, ImDrawFlags_RoundCornersTop); }