From 983be04722cadb064d031b7d066c487a7b16ba64 Mon Sep 17 00:00:00 2001 From: WerWolv Date: Sun, 16 Feb 2025 21:24:10 +0100 Subject: [PATCH] impr: Allow accent colors to have darker colors --- lib/libimhex/source/api/theme_manager.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/libimhex/source/api/theme_manager.cpp b/lib/libimhex/source/api/theme_manager.cpp index 7851cb855..42a187021 100644 --- a/lib/libimhex/source/api/theme_manager.cpp +++ b/lib/libimhex/source/api/theme_manager.cpp @@ -16,7 +16,7 @@ namespace hex { AutoReset> s_styleHandlers; AutoReset s_imageTheme; AutoReset s_currTheme; - AutoReset> s_accentColor; + AutoReset>> s_accentColor; std::recursive_mutex s_themeMutex; } @@ -173,7 +173,8 @@ namespace hex { float h, s, v; ImGui::ColorConvertRGBtoHSV(color->Value.x, color->Value.y, color->Value.z, h, s, v); - h = s_accentColor->value(); + h = s_accentColor->value()[0]; + v = s_accentColor->value()[1]; ImGui::ColorConvertHSVtoRGB(h, s, v, color->Value.x, color->Value.y, color->Value.z); } @@ -257,7 +258,7 @@ namespace hex { float h, s, v; ImGui::ColorConvertRGBtoHSV(color.Value.x, color.Value.y, color.Value.z, h, s, v); - s_accentColor = h; + *s_accentColor = { h, v }; reapplyCurrentTheme(); }