Mercurial > dwindows
diff mac/dw.m @ 1984:09a102c92788
Mac: Fix building on MacOS 10.7 Lion.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Mon, 02 Sep 2019 00:30:19 +0000 |
parents | 59146d14e21e |
children | 8d130e45430d |
line wrap: on
line diff
--- 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);