Revision: 13383
          http://sourceforge.net/p/skim-app/code/13383
Author:   hofman
Date:     2023-03-16 22:35:12 +0000 (Thu, 16 Mar 2023)
Log Message:
-----------
stronger border around color swatch colors with enhanced contrast

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

Modified: trunk/SKColorSwatch.m
===================================================================
--- trunk/SKColorSwatch.m       2023-03-16 17:50:41 UTC (rev 13382)
+++ trunk/SKColorSwatch.m       2023-03-16 22:35:12 UTC (rev 13383)
@@ -977,6 +977,7 @@
     rect = NSInsetRect(rect, 2.0, 2.0);
     CGFloat r = RUNNING_AFTER(10_15) ? 3.0 : 2.0;
     BOOL disabled = RUNNING_AFTER(10_13) && [[self window] isMainWindow] == NO 
&& [[self window] isKeyWindow] == NO && ([self isDescendantOf:[[self window] 
contentView]] == NO || [[self window] 
isKindOfClass:NSClassFromString(@"NSToolbarSnapshotWindow")]);
+    CGFloat stroke = [[NSWorkspace sharedWorkspace] 
accessibilityDisplayShouldIncreaseContrast] ? 0.55 : 0.25;
     NSBezierPath *path = [NSBezierPath 
bezierPathWithRoundedRect:NSInsetRect(rect, 0.5, 0.5) xRadius:r - 0.5 yRadius:r 
- 0.5];
 
     if (NSWidth(rect) > 2.0) {
@@ -992,10 +993,10 @@
         [aColor drawSwatchInRect:rect];
         
         if (SKHasDarkAppearance(self)) {
-            [[NSColor colorWithGenericGamma22White:1.0 alpha:0.25] setStroke];
+            [[NSColor colorWithGenericGamma22White:1.0 alpha:stroke] 
setStroke];
             [[NSGraphicsContext currentContext] 
setCompositingOperation:NSCompositingOperationScreen];
         } else {
-            [[NSColor colorWithGenericGamma22White:0.0 alpha:0.25] setStroke];
+            [[NSColor colorWithGenericGamma22White:0.0 alpha:stroke] 
setStroke];
             [[NSGraphicsContext currentContext] 
setCompositingOperation:NSCompositingOperationMultiply];
         }
         [path stroke];

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