Revision: 12151
          http://sourceforge.net/p/skim-app/code/12151
Author:   hofman
Date:     2021-03-01 15:31:45 +0000 (Mon, 01 Mar 2021)
Log Message:
-----------
Declare class of ivar in interface

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

Modified: trunk/SKColorSwatch.h
===================================================================
--- trunk/SKColorSwatch.h       2021-03-01 15:24:36 UTC (rev 12150)
+++ trunk/SKColorSwatch.h       2021-03-01 15:31:45 UTC (rev 12151)
@@ -40,10 +40,12 @@
 
 extern NSString *SKColorSwatchColorsChangedNotification;
 
+@class SKColorSwatchBackgroundView;
+
 @interface SKColorSwatch : NSControl <NSDraggingSource> {
     NSMutableArray *colors;
     NSMutableArray *itemViews;
-    NSView *backgroundView;
+    SKColorSwatchBackgroundView *backgroundView;
     NSInteger clickedIndex;
     NSInteger selectedIndex;
     NSInteger focusedIndex;

Modified: trunk/SKColorSwatch.m
===================================================================
--- trunk/SKColorSwatch.m       2021-03-01 15:24:36 UTC (rev 12150)
+++ trunk/SKColorSwatch.m       2021-03-01 15:31:45 UTC (rev 12151)
@@ -172,7 +172,7 @@
         
         for (NSView *view in [self subviews]) {
             if ([view isKindOfClass:[SKColorSwatchBackgroundView class]])
-                backgroundView = [view retain];
+                backgroundView = [(SKColorSwatchBackgroundView *)view retain];
             else if ([view isKindOfClass:[SKColorSwatchItemView class]])
                 [itemViews addObject:view];
         }
@@ -289,7 +289,7 @@
     NSUInteger i, iMax = [itemViews count];
     for (i = 0; i < iMax; i++)
         [[itemViews objectAtIndex:i] setFrame:[self frameForItemViewAtIndex:i 
collapsedIndex:-1]];
-    [(SKColorSwatchBackgroundView *)backgroundView setWidth:[self fitWidth]];
+    [backgroundView setWidth:[self fitWidth]];
 }
 
 #pragma mark Drawing
@@ -609,7 +609,7 @@
     for (SKColorSwatchItemView *itemView in itemViews)
         [[itemView animator] setFrame:[self frameForItemViewAtIndex:i++ 
collapsedIndex:collapsedIndex]];
     if (NSEqualSizes(size, NSZeroSize) == NO) {
-        [[(SKColorSwatchBackgroundView *)backgroundView animator] 
setWidth:size.width];
+        [[backgroundView animator] setWidth:size.width];
         if (autoResizes)
             [[self animator] setFrameSize:size];
     }

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