mirror of
https://github.com/ocornut/imgui.git
synced 2026-03-30 21:05:54 -05:00
Viewport: Fixed collapsed windows setting ImGuiViewportFlags_NoRendererClear without making title bar color opaque.
(thanks christopher knorr!)
This commit is contained in:
@@ -6388,9 +6388,11 @@ void ImGui::RenderWindowDecorations(ImGuiWindow* window, const ImRect& title_bar
|
||||
if (window->Collapsed)
|
||||
{
|
||||
// Title bar only
|
||||
float backup_border_size = style.FrameBorderSize;
|
||||
const float backup_border_size = style.FrameBorderSize;
|
||||
g.Style.FrameBorderSize = window->WindowBorderSize;
|
||||
ImU32 title_bar_col = GetColorU32((title_bar_is_highlight && !g.NavDisableHighlight) ? ImGuiCol_TitleBgActive : ImGuiCol_TitleBgCollapsed);
|
||||
if (window->ViewportOwned)
|
||||
title_bar_col |= IM_COL32_A_MASK; // No alpha (we don't support is_docking_transparent_payload here because simpler and less meaningful, but could with a bit of code shuffle/reuse)
|
||||
RenderFrame(title_bar_rect.Min, title_bar_rect.Max, title_bar_col, true, window_rounding);
|
||||
g.Style.FrameBorderSize = backup_border_size;
|
||||
}
|
||||
@@ -6407,8 +6409,7 @@ void ImGui::RenderWindowDecorations(ImGuiWindow* window, const ImRect& title_bar
|
||||
ImU32 bg_col = GetColorU32(GetWindowBgColorIdx(window));
|
||||
if (window->ViewportOwned)
|
||||
{
|
||||
// No alpha
|
||||
bg_col = (bg_col | IM_COL32_A_MASK);
|
||||
bg_col |= IM_COL32_A_MASK; // No alpha
|
||||
if (is_docking_transparent_payload)
|
||||
window->Viewport->Alpha *= DOCKING_TRANSPARENT_PAYLOAD_ALPHA;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user