Merge remote-tracking branch 'PRIVATE/master' into ys_cut

This commit is contained in:
YuSanka 2022-08-15 14:17:42 +02:00
commit a1b324d1ee
5 changed files with 3 additions and 12 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

View File

@ -1410,9 +1410,9 @@ bool GUI_App::dark_mode()
// proper dark mode was first introduced. // proper dark mode was first introduced.
return wxPlatformInfo::Get().CheckOSVersion(10, 14) && mac_dark_mode(); return wxPlatformInfo::Get().CheckOSVersion(10, 14) && mac_dark_mode();
#else #else
return wxGetApp().app_config->get("dark_color_mode") == "1" ? true : check_dark_mode(); if (wxGetApp().app_config->has("dark_color_mode"))
//const unsigned luma = get_colour_approx_luma(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW)); return wxGetApp().app_config->get("dark_color_mode") == "1";
//return luma < 128; return check_dark_mode();
#endif #endif
} }

View File

@ -153,15 +153,6 @@ wxFont get_default_font_for_dpi(const wxWindow *window, int dpi)
} }
bool check_dark_mode() { 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) #if wxCHECK_VERSION(3,1,3)
return wxSystemSettings::GetAppearance().IsDark(); return wxSystemSettings::GetAppearance().IsDark();
#else #else