FIX:supports dark mode on linux systems

Change-Id: I424f4a686ffe0d25075022b7e58c89d2683fcea2
This commit is contained in:
tao wang 2023-05-23 15:33:59 +08:00 committed by Lane.Wei
parent bda8d1cb98
commit 8e41e6cee2
2 changed files with 2 additions and 3 deletions

View file

@ -2354,7 +2354,7 @@ bool GUI_App::on_init_inner()
load_language(wxString(), true);
#ifdef _MSW_DARK_MODE
#ifdef __APPLE__
#ifndef __WINDOWS__
wxSystemAppearance app = wxSystemSettings::GetAppearance();
GUI::wxGetApp().app_config->set("dark_color_mode", app.IsDark() ? "1" : "0");
GUI::wxGetApp().app_config->save();

View file

@ -1876,7 +1876,7 @@ void MainFrame::on_sys_color_changed()
// update label colors in respect to the system mode
wxGetApp().init_label_colours();
#ifdef __APPLE__
#ifndef __WINDOWS__
wxGetApp().force_colors_update();
wxGetApp().update_ui_from_settings();
#endif //__APPLE__
@ -1898,7 +1898,6 @@ void MainFrame::on_sys_color_changed()
// update Plater
wxGetApp().plater()->sys_color_changed();
m_monitor->on_sys_color_changed();
// update Tabs
for (auto tab : wxGetApp().tabs_list)
tab->sys_color_changed();