From 7759eccf5624280ceeb2082ea43db964e446fab3 Mon Sep 17 00:00:00 2001 From: Lukas Matena Date: Thu, 27 Feb 2020 14:38:39 +0100 Subject: [PATCH] Fix of dark mode detection on macOS 10.12 and 10.13 --- src/slic3r/GUI/GUI_App.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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;