Fix of dark mode detection on macOS 10.12 and 10.13
This commit is contained in:
parent
dff9af20a4
commit
7759eccf56
@ -332,7 +332,11 @@ unsigned GUI_App::get_colour_approx_luma(const wxColour &colour)
|
|||||||
bool GUI_App::dark_mode()
|
bool GUI_App::dark_mode()
|
||||||
{
|
{
|
||||||
#if __APPLE__
|
#if __APPLE__
|
||||||
return mac_dark_mode();
|
// The check for dark mode returns false positive on 10.12 and 10.13,
|
||||||
|
// which allowed setting dark menu bar and dock area, which is
|
||||||
|
// is detected as dark mode. We must run on at least 10.14 where the
|
||||||
|
// proper dark mode was first introduced.
|
||||||
|
return wxPlatformInfo::Get().CheckOSVersion(10, 14) && mac_dark_mode();
|
||||||
#else
|
#else
|
||||||
const unsigned luma = get_colour_approx_luma(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW));
|
const unsigned luma = get_colour_approx_luma(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW));
|
||||||
return luma < 128;
|
return luma < 128;
|
||||||
|
Loading…
Reference in New Issue
Block a user