Revision: 24142
          http://sourceforge.net/p/bibdesk/svn/24142
Author:   hofman
Date:     2019-08-16 14:15:30 +0000 (Fri, 16 Aug 2019)
Log Message:
-----------
use separatorColor for preference if available

Modified Paths:
--------------
    trunk/bibdesk/BDSKPreferenceIconView.m

Modified: trunk/bibdesk/BDSKPreferenceIconView.m
===================================================================
--- trunk/bibdesk/BDSKPreferenceIconView.m      2019-08-16 14:02:42 UTC (rev 
24141)
+++ trunk/bibdesk/BDSKPreferenceIconView.m      2019-08-16 14:15:30 UTC (rev 
24142)
@@ -58,6 +58,12 @@
 #define MAXIMUM_BLUR 10U
 
 
+#if SDK_BEFORE(10_14)
+@interface NSColor (BDSKMojaveDeclarations)
++ (NSColor *)separatorColor;
+@end
+#endif
+
 @interface BDSKPreferenceIconView (Private)
 - (void)setupViewWithPreferenceController:(BDSKPreferenceController 
*)aController;
 @end
@@ -206,7 +212,10 @@
         return;
     NSUInteger i, iMax = [captionTitles count];
     NSColor *backgroundColor = [[NSColor controlTextColor] 
colorWithAlphaComponent:0.03];
-    NSColor *dividerColor = [[NSColor controlTextColor] 
colorWithAlphaComponent:0.1];
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wpartial-availability"
+    NSColor *dividerColor = [NSColor 
respondsToSelector:@selector(separatorColor)] ? [NSColor separatorColor] : 
[[NSColor controlTextColor] colorWithAlphaComponent:0.1];
+#pragma clang diagnostic pop
     NSRect rect = NSMakeRect(0.0, TOP_MARGIN, NSWidth([self bounds]), 
ceil((NSHeight([self bounds]) - TOP_MARGIN - BOTTOM_MARGIN) / iMax));
     NSRect captionRect = NSMakeRect(SIDE_CAPTION_MARGIN, NSMinY(rect) + 
TOP_CAPTION_MARGIN, NSWidth(rect) - SIDE_CAPTION_MARGIN, [captionCell 
cellSize].height);
     NSRect dividerRect = rect;

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.



_______________________________________________
Bibdesk-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit

Reply via email to