MSW specific: Fixed update of the UI after system color change.

Note: the wxEVT_SYS_COLOUR_CHANGED event works only for high contrast settings under MSW.

+ ConfigSnapshotDialog: Fixed UI colors for dark mode on all platforms
This commit is contained in:
YuSanka 2021-04-06 22:20:24 +02:00
parent 2418b3dbeb
commit effad844e2
6 changed files with 40 additions and 8 deletions

View file

@ -522,6 +522,8 @@ void MainFrame::init_tabpanel()
#ifndef __WXOSX__ // Don't call SetFont under OSX to avoid name cutting in ObjectList
m_tabpanel->SetFont(Slic3r::GUI::wxGetApp().normal_font());
#endif
if (wxSystemSettings::GetAppearance().IsDark())
m_tabpanel->SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW));
m_tabpanel->Hide();
m_settings_dialog.set_tabpanel(m_tabpanel);
@ -838,6 +840,9 @@ void MainFrame::on_sys_color_changed()
// update label colors in respect to the system mode
wxGetApp().init_label_colours();
#ifdef __WXMSW__
m_tabpanel->SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW));
#endif
// update Plater
wxGetApp().plater()->sys_color_changed();