Skip to content

Commit

Permalink
SetupDefaultImGuiStyle: do not override theme choice!
Browse files Browse the repository at this point in the history
  • Loading branch information
pthom committed Jun 15, 2024
1 parent 8d3459c commit 69d8ecc
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/hello_imgui/impl/imgui_default_settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,16 +73,13 @@ void SetupDefaultImGuiConfig()

void SetupDefaultImGuiStyle()
{
auto& io = ImGui::GetIO();
// Setup Dear ImGui style
ImGui::StyleColorsDark();
// ImGui::StyleColorsClassic();
// Note: a theme was already applied via ImGuiWindowParams.tweakedTheme

// When viewports are enabled we tweak WindowRounding/WindowBg so platform windows
// can look identical to regular ones.
ImGuiStyle& style = ImGui::GetStyle();
if (io.ConfigFlags & ImGuiConfigFlags_ViewportsEnable)
if (ImGui::GetIO().ConfigFlags & ImGuiConfigFlags_ViewportsEnable)
{
ImGuiStyle& style = ImGui::GetStyle();
style.WindowRounding = 0.0f;
style.Colors[ImGuiCol_WindowBg].w = 1.0f;
}
Expand Down

0 comments on commit 69d8ecc

Please sign in to comment.