From 12ed2c9b41f231e4691b483f5b2dd287924b5b31 Mon Sep 17 00:00:00 2001 From: Zachary Hall Date: Sun, 16 Jul 2023 17:24:59 -0700 Subject: [PATCH] Fix accent color not updating theme. --- main.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/main.cpp b/main.cpp index 3ab76fb..e77df49 100644 --- a/main.cpp +++ b/main.cpp @@ -388,7 +388,9 @@ int main(int, char**) ImGui::EndListBox(); } ImGui::SetNextItemWidth(ImGui::GetWindowWidth() - (ImGui::GetStyle().FramePadding.x * 4)); - ImGui::SliderFloat("##AccentColor", &accent_color, 0.0, 360.0, "UI hue: %.0f°", ImGuiSliderFlags_NoRoundToFormat); + if (ImGui::SliderFloat("##AccentColor", &accent_color, 0.0, 360.0, "UI hue: %.0f°", ImGuiSliderFlags_NoRoundToFormat)) { + theme->Apply(accent_color); + } } ImGui::End(); }