Revision: 24178
          http://sourceforge.net/p/bibdesk/svn/24178
Author:   hofman
Date:     2019-09-01 22:07:34 +0000 (Sun, 01 Sep 2019)
Log Message:
-----------
try to match fileview selection highlight to Finder's, same for light and dark 
mode

Modified Paths:
--------------
    trunk/bibdesk_vendorsrc/amaxwell/FileView/FVFileView.h
    trunk/bibdesk_vendorsrc/amaxwell/FileView/FVFileView.m

Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FVFileView.h
===================================================================
--- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVFileView.h      2019-09-01 
21:04:09 UTC (rev 24177)
+++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVFileView.h      2019-09-01 
22:07:34 UTC (rev 24178)
@@ -236,7 +236,6 @@
         unsigned int hasArrows:1;
         unsigned int controllingSharedPreviewer:1;
         unsigned int controllingQLPreviewPanel:1;
-        unsigned int selectionOverlayIsDark:1;
     } _fvFlags;
     NSSize                   _padding;
     NSSize                   _iconSize;

Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FVFileView.m
===================================================================
--- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVFileView.m      2019-09-01 
21:04:09 UTC (rev 24177)
+++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVFileView.m      2019-09-01 
22:07:34 UTC (rev 24178)
@@ -304,7 +304,6 @@
     _fvFlags.isEditable = NO;
     [self setBackgroundColor:[[self class] defaultBackgroundColor]];
     _selectionOverlay = NULL;
-    _fvFlags.selectionOverlayIsDark = NO;
     _numberOfColumns = 1;
     _numberOfRows = 1;
     
@@ -2035,12 +2034,6 @@
 {
     CGContextRef drawingContext = [[NSGraphicsContext currentContext] 
graphicsPort];
     
-    // redraw overlay when appearance has changed
-    if (FVHasDarkAppearance(nil) != _fvFlags.selectionOverlayIsDark && NULL != 
_selectionOverlay) {
-        CGLayerRelease(_selectionOverlay);
-        _selectionOverlay = NULL;
-    }
-    
     // drawing into a CGImage and then overlaying it keeps the rubber band 
highlight much more responsive
     if (NULL == _selectionOverlay) {
         
@@ -2058,10 +2051,8 @@
         [nsContext saveGraphicsState];
         
         // @@ Dark mode
-        NSColor *color = [[NSColor alternateSelectedControlTextColor] 
colorUsingColorSpaceName:NSDeviceRGBColorSpace];
-        NSColor *strokeColor = [color colorWithAlphaComponent:0.7 * [color 
alphaComponent]];
-        color = [[NSColor controlTextColor] 
colorUsingColorSpaceName:NSDeviceRGBColorSpace];
-        NSColor *fillColor = [color colorWithAlphaComponent:0.2 * [color 
alphaComponent]];
+        NSColor *strokeColor = [NSColor colorWithCalibratedWhite:224.0 / 255.0 
alpha:124.0 / 255.0];
+        NSColor *fillColor = [NSColor colorWithCalibratedWhite:0.0 alpha:32.0 
/ 255.0];
         [strokeColor setStroke];
         [fillColor setFill];
         imageRect = NSInsetRect(imageRect, 1.0, 1.0);

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