diff options
author | Lukas Matena <lukasmatena@seznam.cz> | 2020-02-27 16:38:39 +0300 |
---|---|---|
committer | Lukas Matena <lukasmatena@seznam.cz> | 2020-02-28 17:28:04 +0300 |
commit | 7759eccf5624280ceeb2082ea43db964e446fab3 (patch) | |
tree | d88d7fc84ca18bd73c28240b3ee92ff52eee8a59 | |
parent | dff9af20a4ee035a7dc906756b5dc15acf51625a (diff) |
Fix of dark mode detection on macOS 10.12 and 10.13
-rw-r--r-- | src/slic3r/GUI/GUI_App.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/slic3r/GUI/GUI_App.cpp b/src/slic3r/GUI/GUI_App.cpp index 269684454..f45ef255a 100644 --- a/src/slic3r/GUI/GUI_App.cpp +++ b/src/slic3r/GUI/GUI_App.cpp @@ -332,7 +332,11 @@ unsigned GUI_App::get_colour_approx_luma(const wxColour &colour) bool GUI_App::dark_mode() { #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 const unsigned luma = get_colour_approx_luma(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW)); return luma < 128; |