FIX:fixed some issues with dark mode on mac

Change-Id: Ic43760cd8e934f463c2bf35c2fa240d8e5b14c20
This commit is contained in:
tao wang 2022-12-06 10:10:40 +08:00 committed by Lane.Wei
parent a1fcd05baa
commit dc55a6a2a6
3 changed files with 28 additions and 4 deletions

View file

@ -2110,6 +2110,14 @@ bool GUI_App::on_init_inner()
// If load_language() fails, the application closes.
load_language(wxString(), true);
#ifdef _MSW_DARK_MODE
#ifdef __APPLE__
wxSystemAppearance app = wxSystemSettings::GetAppearance();
GUI::wxGetApp().app_config->set("dark_color_mode", app.IsDark() ? "1" : "0");
GUI::wxGetApp().app_config->save();
#endif // __APPLE__
bool init_dark_color_mode = app_config->get("dark_color_mode") == "1";
bool init_sys_menu_enabled = app_config->get("sys_menu_enabled") == "1";
#ifdef __WINDOWS__