Skip to content

Commit

Permalink
Fixed title bar background alpha being used to render viewport-owned …
Browse files Browse the repository at this point in the history
…windows.

Fixes ocornut#7181
  • Loading branch information
PathogenDavid committed Dec 30, 2023
1 parent 20e1cae commit a7a83b9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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]


-----------------------------------------------------------------------
Expand Down
2 changes: 2 additions & 0 deletions imgui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit a7a83b9

Please sign in to comment.