Skip to content

Commit

Permalink
Fix issue with ImGui & Viewports: title bar cannot be transparen
Browse files Browse the repository at this point in the history
  • Loading branch information
pthom committed Dec 24, 2023
1 parent 3bb0c1a commit 767cff7
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/hello_imgui/internal/backend_impls/abstract_runner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,15 @@ void AbstractRunner::Setup()
SetLayoutResetIfNeeded();

ImGuiTheme::ApplyTweakedTheme(params.imGuiWindowParams.tweakedTheme);

// Fix issue with ImGui & Viewports: title bar cannot be transparent
if (params.imGuiWindowParams.enableViewports)
{
auto& style = ImGui::GetStyle();
style.Colors[ImGuiCol_TitleBg].w = 1.f;
style.Colors[ImGuiCol_TitleBgActive].w = 1.f;
style.Colors[ImGuiCol_TitleBgCollapsed].w = 1.f;
}
}

void AbstractRunner::SetLayoutResetIfNeeded()
Expand Down

0 comments on commit 767cff7

Please sign in to comment.