diff --git a/src/slic3r/GUI/GUI_App.cpp b/src/slic3r/GUI/GUI_App.cpp index 95ef05c45..bb17c3dc0 100644 --- a/src/slic3r/GUI/GUI_App.cpp +++ b/src/slic3r/GUI/GUI_App.cpp @@ -1410,9 +1410,9 @@ bool GUI_App::dark_mode() // proper dark mode was first introduced. return wxPlatformInfo::Get().CheckOSVersion(10, 14) && mac_dark_mode(); #else - return wxGetApp().app_config->get("dark_color_mode") == "1" ? true : check_dark_mode(); - //const unsigned luma = get_colour_approx_luma(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW)); - //return luma < 128; + if (wxGetApp().app_config->has("dark_color_mode")) + return wxGetApp().app_config->get("dark_color_mode") == "1"; + return check_dark_mode(); #endif } diff --git a/src/slic3r/GUI/GUI_Utils.cpp b/src/slic3r/GUI/GUI_Utils.cpp index 73bfb3bec..d9bffa3f4 100644 --- a/src/slic3r/GUI/GUI_Utils.cpp +++ b/src/slic3r/GUI/GUI_Utils.cpp @@ -153,15 +153,6 @@ wxFont get_default_font_for_dpi(const wxWindow *window, int dpi) } bool check_dark_mode() { -#if 0 //#ifdef _WIN32 // #ysDarkMSW - Allow it when we deside to support the sustem colors for application - wxRegKey rk(wxRegKey::HKCU, - "Software\\Microsoft\\Windows\\CurrentVersion\\Themes\\Personalize"); - if (rk.Exists() && rk.HasValue("AppsUseLightTheme")) { - long value = -1; - rk.QueryValue("AppsUseLightTheme", &value); - return value <= 0; - } -#endif #if wxCHECK_VERSION(3,1,3) return wxSystemSettings::GetAppearance().IsDark(); #else