Revision: 12135
          http://sourceforge.net/p/skim-app/code/12135
Author:   hofman
Date:     2021-02-27 16:04:30 +0000 (Sat, 27 Feb 2021)
Log Message:
-----------
No need to pass static radius

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

Modified: trunk/SKColorSwatch.m
===================================================================
--- trunk/SKColorSwatch.m       2021-02-27 15:58:40 UTC (rev 12134)
+++ trunk/SKColorSwatch.m       2021-02-27 16:04:30 UTC (rev 12135)
@@ -250,7 +250,7 @@
 
 #pragma mark Drawing
 
-- (void)drawSwatchAtIndex:(NSInteger)i inRect:(NSRect)rect 
borderColor:(NSColor *)borderColor radius:(CGFloat)r disabled:(BOOL)disabled {
+- (void)drawSwatchAtIndex:(NSInteger)i inRect:(NSRect)rect 
borderColor:(NSColor *)borderColor disabled:(BOOL)disabled {
     if (NSWidth(rect) < 1.0)
         return;
     if (NSWidth(rect) > 2.0) {
@@ -264,7 +264,7 @@
             CGContextSetAlpha([[NSGraphicsContext currentContext] 
graphicsPort], 1.0);
     }
     [borderColor setStroke];
-    [[NSBezierPath bezierPathWithRoundedRect:NSInsetRect(rect, 0.5, 0.5) 
xRadius:r yRadius:r] stroke];
+    [[NSBezierPath bezierPathWithRoundedRect:NSInsetRect(rect, 0.5, 0.5) 
xRadius:1.5 yRadius:1.5] stroke];
 }
 
 - (void)drawRect:(NSRect)dirtyRect {
@@ -309,7 +309,7 @@
                 rect.origin.x += distance * modifyOffset;
             if (modifiedIndex == i && moveIndex == -1)
                 rect.size.width -= modifyOffset * distance;
-            [self drawSwatchAtIndex:i inRect:rect borderColor:(clickedIndex == 
i ? highlightColor : borderColor) radius:1.5 disabled:disabled];
+            [self drawSwatchAtIndex:i inRect:rect borderColor:(clickedIndex == 
i ? highlightColor : borderColor) disabled:disabled];
             if (((dropIndex == i && insert == NO) || selectedIndex == i) && 
NSWidth(rect) > 0.0) {
                 path = [NSBezierPath bezierPathWithRoundedRect:rect 
xRadius:2.0 yRadius:2.0];
                 [path setLineWidth:2.0];
@@ -327,7 +327,7 @@
     if (moveIndex != -1) {
         rect = [self frameForColorAtIndex:modifiedIndex];
         rect.origin.x += distance * modifyOffset * (moveIndex - modifiedIndex);
-        [self drawSwatchAtIndex:modifiedIndex inRect:rect 
borderColor:dropColor radius:1.5 disabled:disabled];
+        [self drawSwatchAtIndex:modifiedIndex inRect:rect 
borderColor:dropColor disabled:disabled];
     }
     
     if (dropIndex != -1 && insert) {

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