Revision: 7576
          http://skim-app.svn.sourceforge.net/skim-app/?rev=7576&view=rev
Author:   hofman
Date:     2011-12-16 01:14:24 +0000 (Fri, 16 Dec 2011)
Log Message:
-----------
don't include padding in expansion frame

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

Modified: trunk/SKProgressCell.m
===================================================================
--- trunk/SKProgressCell.m      2011-12-15 23:46:35 UTC (rev 7575)
+++ trunk/SKProgressCell.m      2011-12-16 01:14:24 UTC (rev 7576)
@@ -152,7 +152,7 @@
     NSRectEdge topEdge = [controlView isFlipped] ? NSMinYEdge : NSMaxYEdge;
     NSRect insetRect = SKShrinkRect(NSInsetRect(cellFrame, MARGIN_X, 0.0), 
MARGIN_Y, bottomEdge);
     
-    [super drawWithFrame:SKSliceRect(insetRect, [super 
cellSizeForBounds:cellFrame].height, topEdge) inView:controlView];
+    [self drawInteriorWithFrame:SKSliceRect(insetRect, [super 
cellSizeForBounds:cellFrame].height, topEdge) inView:controlView];
     
     if (progressIndicator) {
         [progressIndicator setFrame:SKSliceRect(insetRect, 
NSHeight([progressIndicator frame]), bottomEdge)];
@@ -160,21 +160,22 @@
         if ([progressIndicator isDescendantOf:controlView] == NO)
             [controlView addSubview:progressIndicator];
     } else { 
-        [statusCell drawWithFrame:SKSliceRect(insetRect, [statusCell 
cellSize].height, bottomEdge) inView:controlView];
+        [statusCell drawInteriorWithFrame:SKSliceRect(insetRect, [statusCell 
cellSize].height, bottomEdge) inView:controlView];
     }
 }
 
-- (void)drawWithExpansionFrame:(NSRect)cellFrame inView:(NSView *)controlView {
-    NSRectEdge bottomEdge = [controlView isFlipped] ? NSMaxYEdge : NSMinYEdge;
-    NSRectEdge topEdge = [controlView isFlipped] ? NSMinYEdge : NSMaxYEdge;
-    NSRect insetRect = SKShrinkRect(NSInsetRect(cellFrame, MARGIN_X, 0.0), 
MARGIN_Y, bottomEdge);
+- (void)drawWithExpansionFrame:(NSRect)cellFrame inView:(NSView *)view {
+    [self drawInteriorWithFrame:SKSliceRect(cellFrame, [super 
cellSizeForBounds:cellFrame].height, [view isFlipped] ? NSMinYEdge : 
NSMaxYEdge) inView:view];
     
-    [super drawWithFrame:SKSliceRect(insetRect, [super 
cellSizeForBounds:cellFrame].height, topEdge) inView:controlView];
-    
     if (nil == objectValueForKey([self objectValue], 
SKDownloadProgressIndicatorKey))
-        [statusCell drawWithFrame:SKSliceRect(insetRect, [statusCell 
cellSize].height, bottomEdge) inView:controlView];
+        [statusCell drawInteriorWithFrame:SKSliceRect(cellFrame, [statusCell 
cellSize].height, [view isFlipped] ? NSMaxYEdge : NSMinYEdge) inView:view];
 }
 
+- (NSRect)expansionFrameWithFrame:(NSRect)cellFrame inView:(NSView *)view {
+    NSRect rect = [super expansionFrameWithFrame:cellFrame inView:view];
+    return SKShrinkRect(SKShrinkRect(rect, MARGIN_X, NSMinXEdge), MARGIN_Y, 
[view isFlipped] ? NSMaxYEdge : NSMinYEdge);
+}
+
 #pragma mark Accessibility
 
 - (id)accessibilityAttributeNames {

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


------------------------------------------------------------------------------
Learn Windows Azure Live!  Tuesday, Dec 13, 2011
Microsoft is holding a special Learn Windows Azure training event for 
developers. It will provide a great way to learn Windows Azure and what it 
provides. You can attend the event by watching it streamed LIVE online.  
Learn more at http://p.sf.net/sfu/ms-windowsazure
_______________________________________________
Skim-app-commit mailing list
Skim-app-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to