Revision: 7572
          http://skim-app.svn.sourceforge.net/skim-app/?rev=7572&view=rev
Author:   hofman
Date:     2011-12-13 22:17:57 +0000 (Tue, 13 Dec 2011)
Log Message:
-----------
variables for edges

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

Modified: trunk/SKProgressCell.m
===================================================================
--- trunk/SKProgressCell.m      2011-12-13 14:01:52 UTC (rev 7571)
+++ trunk/SKProgressCell.m      2011-12-13 22:17:57 UTC (rev 7572)
@@ -137,20 +137,22 @@
 - (void)drawWithFrame:(NSRect)cellFrame inView:(NSView *)controlView {
     NSProgressIndicator *progressIndicator = objectValueForKey([self 
objectValue], SKDownloadProgressIndicatorKey);
     NSRect rect, ignored, insetRect;
+    NSRectEdge bottomEdge = [controlView isFlipped] ? NSMaxYEdge : NSMinYEdge;
+    NSRectEdge topEdge = [controlView isFlipped] ? NSMinYEdge : NSMaxYEdge;
     
-    NSDivideRect(NSInsetRect(cellFrame, MARGIN_X, 0.0), &ignored, &insetRect, 
MARGIN_Y, [controlView isFlipped] ? NSMaxYEdge : NSMinYEdge);
+    NSDivideRect(NSInsetRect(cellFrame, MARGIN_X, 0.0), &ignored, &insetRect, 
MARGIN_Y, bottomEdge);
     
-    NSDivideRect(insetRect, &rect, &ignored, [self cellSize].height, 
[controlView isFlipped] ? NSMinYEdge : NSMaxYEdge);
+    NSDivideRect(insetRect, &rect, &ignored, [self cellSize].height, topEdge);
     [super drawWithFrame:rect inView:controlView];
     
     if (progressIndicator) {
-        NSDivideRect(insetRect, &rect, &ignored, NSHeight([progressIndicator 
frame]), [controlView isFlipped] ? NSMaxYEdge : NSMinYEdge);
+        NSDivideRect(insetRect, &rect, &ignored, NSHeight([progressIndicator 
frame]), bottomEdge);
         [progressIndicator setFrame:rect];
         
         if ([progressIndicator isDescendantOf:controlView] == NO)
             [controlView addSubview:progressIndicator];
     } else { 
-        NSDivideRect(insetRect, &rect, &ignored, [statusCell cellSize].height, 
[controlView isFlipped] ? NSMaxYEdge : NSMinYEdge);
+        NSDivideRect(insetRect, &rect, &ignored, [statusCell cellSize].height, 
bottomEdge);
         [statusCell drawWithFrame:rect inView:controlView];
     }
 }

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


------------------------------------------------------------------------------
Systems Optimization Self Assessment
Improve efficiency and utilization of IT resources. Drive out cost and 
improve service delivery. Take 5 minutes to use this Systems Optimization 
Self Assessment. http://www.accelacomm.com/jaw/sdnl/114/51450054/
_______________________________________________
Skim-app-commit mailing list
Skim-app-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to