Revision: 24155
http://sourceforge.net/p/bibdesk/svn/24155
Author: hofman
Date: 2019-08-21 14:15:57 +0000 (Wed, 21 Aug 2019)
Log Message:
-----------
use dark mode safe colors for finder labels and draw highlight below color
Modified Paths:
--------------
trunk/bibdesk_vendorsrc/amaxwell/FileView/FVColorMenuView.m
Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FVColorMenuView.m
===================================================================
--- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVColorMenuView.m 2019-08-21
06:30:53 UTC (rev 24154)
+++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVColorMenuView.m 2019-08-21
14:15:57 UTC (rev 24155)
@@ -42,6 +42,11 @@
static NSString * const FVColorNameUpdateNotification =
@"FVColorNameUpdateNotification";
+@interface NSColor (FVYosemiteDeclarations)
+- (NSColor *)secondaryLabelColor;
+- (NSColor *)tertiaryLabelColor;
+@end
+
@interface FVColorMenuCell : NSButtonCell
@end
@@ -92,7 +97,7 @@
[_labelNameCell setAlignment:NSCenterTextAlignment];
[_labelNameCell setFont:[NSFont boldSystemFontOfSize:[NSFont
smallSystemFontSize]]];
// @@ Dark mode
- [_labelNameCell setTextColor:[NSColor disabledControlTextColor]];
+ [_labelNameCell setTextColor:[NSColor
respondsToSelector:@selector(secondaryLabelColor)] ? [NSColor
secondaryLabelColor] : [NSColor disabledControlTextColor]];
[self _createMatrix];
@@ -268,7 +273,7 @@
[p lineToPoint:NSMakePoint(NSMaxX(interiorFrame),
NSMinY(interiorFrame))];
[p setLineWidth:2.0];
[p setLineCapStyle:NSRoundLineCapStyle];
- [[NSColor darkGrayColor] setStroke];
+ [[NSColor colorWithCalibratedWhite:FVHasDarkAppearance(nil) ? 0.66667
: 0.33333 alpha:1.0] setStroke];
[p stroke];
}
else {
@@ -275,6 +280,7 @@
NSShadow *labelShadow = [NSShadow new];
[labelShadow setShadowOffset:NSMakeSize(0.0, -1.0)];
[labelShadow setShadowBlurRadius:2.0];
+ [labelShadow setShadowColor:[[NSColor controlTextColor]
colorWithAlphaComponent:0.33333]];
[labelShadow set];
[FVFinderLabel drawFinderLabel:tag inRect:interiorFrame roundEnds:NO];
[labelShadow release];
@@ -364,8 +370,6 @@
- (void)drawRect:(NSRect)aRect
{
- [super drawRect:aRect];
-
// @@ Dark mode
// draw a box around the moused-over cell (unless it's selected); the X
cell always gets highlighted, since it's never drawn as selected
@@ -387,6 +391,8 @@
[boxPath setLineWidth:BOX_WIDTH];
[boxPath stroke];
}
+
+ [super drawRect:aRect];
}
- (void)mouseEntered:(NSEvent *)event
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