Revision: 15018
          http://sourceforge.net/p/skim-app/code/15018
Author:   hofman
Date:     2025-03-24 17:03:06 +0000 (Mon, 24 Mar 2025)
Log Message:
-----------
remove convenience intermediate method

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

Modified: trunk/SKColorSwatch.m
===================================================================
--- trunk/SKColorSwatch.m       2025-03-24 16:48:16 UTC (rev 15017)
+++ trunk/SKColorSwatch.m       2025-03-24 17:03:06 UTC (rev 15018)
@@ -201,10 +201,6 @@
     return bezelHeight - COLOR_INSET;
 }
 
-- (NSSize)contentSizeForNumberOfColors:(NSUInteger)count {
-    return NSMakeSize(COLOR_INSET + count * [self distanceBetweenColors], 
bezelHeight);
-}
-
 - (NSRect)frameForColorAtIndex:(NSInteger)anIndex {
     NSEdgeInsets insets = [self alignmentRectInsets];
     NSRect rect = NSMakeRect(insets.left, insets.bottom, bezelHeight, 
bezelHeight);
@@ -250,15 +246,12 @@
 }
 
 - (NSSize)sizeForNumberOfColors:(NSUInteger)count {
-    NSSize size = [self contentSizeForNumberOfColors:count];
     NSEdgeInsets insets = [self alignmentRectInsets];
-    size.height += insets.bottom + insets.top;
-    size.width += insets.left + insets.right;
-    return size;
+    return NSMakeSize(COLOR_INSET + count * [self distanceBetweenColors] + 
insets.left + insets.right, bezelHeight + insets.bottom + insets.top);
 }
 
 - (NSSize)intrinsicContentSize {
-    return [self contentSizeForNumberOfColors:[colors count]];
+    return NSMakeSize(COLOR_INSET + [colors count] * [self 
distanceBetweenColors], bezelHeight);
 }
 
 - (void)sizeToFit {

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



_______________________________________________
Skim-app-commit mailing list
Skim-app-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to