# HG changeset patch # User bsmith@81767d24-ef19-dc11-ae90-00e081727c95 # Date 1567384219 0 # Node ID 09a102c92788f1a5c0fd7e042b488803ce9e07e6 # Parent 59146d14e21eed61d2e0b43075524fb43d2441de Mac: Fix building on MacOS 10.7 Lion. diff -r 59146d14e21e -r 09a102c92788 mac/dw.m --- a/mac/dw.m Sun Sep 01 18:49:03 2019 +0000 +++ b/mac/dw.m Mon Sep 02 00:30:19 2019 +0000 @@ -409,9 +409,11 @@ } /* Returns TRUE of Mojave or later is in Dark Mode */ -BOOL _is_dark(NSAppearance * appearance) +BOOL _is_dark(id object) { #ifdef BUILDING_FOR_MOJAVE + NSAppearance *appearance = [object effectiveAppearance]; + if(@available(macOS 10.14, *)) { NSAppearanceName basicAppearance = [appearance bestMatchFromAppearancesWithNames:@[ @@ -2318,7 +2320,7 @@ { /* Update any system colors based on the Dark Mode */ _DW_COLOR_ROW_EVEN = DW_RGB_TRANSPARENT; - if(_is_dark([self effectiveAppearance])) + if(_is_dark(self)) _DW_COLOR_ROW_ODD = DW_RGB(100, 100, 100); else _DW_COLOR_ROW_ODD = DW_RGB(230, 230, 230);