Revision: 10186
          http://sourceforge.net/p/skim-app/code/10186
Author:   hofman
Date:     2018-12-27 23:13:11 +0000 (Thu, 27 Dec 2018)
Log Message:
-----------
use custom colors for note outline view resize indicator

Modified Paths:
--------------
    trunk/SKNoteOutlineView.m

Modified: trunk/SKNoteOutlineView.m
===================================================================
--- trunk/SKNoteOutlineView.m   2018-12-27 19:21:09 UTC (rev 10185)
+++ trunk/SKNoteOutlineView.m   2018-12-27 23:13:11 UTC (rev 10186)
@@ -149,18 +149,15 @@
         NSRect rect = [self rectOfRow:row];
         CGFloat x = ceil(NSMidX(rect));
         CGFloat y = NSMaxY(rect) - 1.5;
-        NSColor *color = nil;
+        BOOL isHighlighted = [[self window] isKeyWindow] && [[self window] 
firstResponder] == self && [self isRowSelected:row];
+        BOOL isDark = SKHasDarkAppearance(nil);
         
         // @@ Dark mode
-        if ([[self window] isKeyWindow] && [[self window] firstResponder] == 
self && [self isRowSelected:row])
-            color = [[NSColor alternateSelectedControlTextColor] 
colorWithAlphaComponent:0.7];
-        else
-            color = [[NSColor disabledControlTextColor] 
colorWithAlphaComponent:0.7];
 
         [NSGraphicsContext saveGraphicsState];
         [NSBezierPath setDefaultLineWidth:1.0];
         
-        [color setStroke];
+        [[NSColor colorWithCalibratedWhite:isDark || isHighlighted ? 1.0 : 0.0 
alpha:isHighlighted ? 0.7 : 0.5] setStroke];
         [NSBezierPath strokeLineFromPoint:NSMakePoint(x - 1.0, y) 
toPoint:NSMakePoint(x + 1.0, y)];
         y -= 2.0;
         [NSBezierPath strokeLineFromPoint:NSMakePoint(x - 3.0, y) 
toPoint:NSMakePoint(x + 3.0, y)];

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



_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to