From 93140231c61c4edbe61d50662e1a37fd096334cd Mon Sep 17 00:00:00 2001 From: Green Sky Date: Sun, 21 Jan 2024 14:28:56 +0100 Subject: [PATCH] theme according to system --- src/main.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 4b76d3ba..55e818b2 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -55,8 +55,12 @@ int main(int argc, char** argv) { IMGUI_CHECKVERSION(); ImGui::CreateContext(); - //ImGui::StyleColorsDark(); - setThemeGreen(); + if (SDL_GetSystemTheme() == SDL_SYSTEM_THEME_LIGHT) { + ImGui::StyleColorsLight(); + } else { + //ImGui::StyleColorsDark(); + setThemeGreen(); + } { ImGui::GetIO().Fonts->ClearFonts();