Revision: 4448
http://skim-app.svn.sourceforge.net/skim-app/?rev=4448&view=rev
Author: hofman
Date: 2008-08-25 20:58:06 +0000 (Mon, 25 Aug 2008)
Log Message:
-----------
Smaller font for status message in download table. Put file name at the top.
Modified Paths:
--------------
trunk/SKProgressCell.m
Modified: trunk/SKProgressCell.m
===================================================================
--- trunk/SKProgressCell.m 2008-08-25 18:35:10 UTC (rev 4447)
+++ trunk/SKProgressCell.m 2008-08-25 20:58:06 UTC (rev 4448)
@@ -85,29 +85,29 @@
- (void)drawWithFrame:(NSRect)cellFrame inView:(NSView *)controlView {
id value = [[[self objectValue] retain] autorelease];
NSProgressIndicator *progressIndicator = [self progressIndicator];
- NSRect textRect, ignored;
+ NSRect rect, ignored, insetRect;
+ NSDivideRect(NSInsetRect(cellFrame, MARGIN_X, 0.0), &ignored, &insetRect,
MARGIN_Y, [controlView isFlipped] ? NSMaxYEdge : NSMinYEdge);
+
[self setObjectValue:[self fileName]];
- NSDivideRect(NSInsetRect(cellFrame, MARGIN_X, 0.0), &textRect, &ignored,
[self cellSize].height, [controlView isFlipped] ? NSMaxYEdge : NSMinYEdge);
- [super drawWithFrame:textRect inView:controlView];
+ NSDivideRect(insetRect, &rect, &ignored, [self cellSize].height,
[controlView isFlipped] ? NSMinYEdge : NSMaxYEdge);
+ [super drawWithFrame:rect inView:controlView];
[self setObjectValue:value];
if (progressIndicator) {
- NSRect barRect = NSInsetRect(cellFrame, MARGIN_X, 0.0);
- barRect.size.height = NSHeight([progressIndicator frame]);
- if ([controlView isFlipped])
- barRect.origin.y += MARGIN_Y;
- else
- barRect.origin.y = NSMaxY(cellFrame) - NSHeight(barRect) -
MARGIN_Y;
- [progressIndicator setFrame:barRect];
+ NSDivideRect(insetRect, &rect, &ignored, NSHeight([progressIndicator
frame]), [controlView isFlipped] ? NSMaxYEdge : NSMinYEdge);
+ [progressIndicator setFrame:rect];
if ([progressIndicator isDescendantOf:controlView] == NO)
[controlView addSubview:progressIndicator];
} else {
+ NSFont *font = [[[self font] retain] autorelease];
+ [self setFont:[[NSFontManager sharedFontManager] convertFont:font
toSize:10.0]];
[self setObjectValue:[self statusDescription]];
- NSDivideRect(NSInsetRect(cellFrame, MARGIN_X, 0.0), &textRect,
&ignored, [self cellSize].height, [controlView isFlipped] ? NSMinYEdge :
NSMaxYEdge);
- [super drawWithFrame:textRect inView:controlView];
+ NSDivideRect(insetRect, &rect, &ignored, [self cellSize].height,
[controlView isFlipped] ? NSMaxYEdge : NSMinYEdge);
+ [super drawWithFrame:rect inView:controlView];
[self setObjectValue:value];
+ [self setFont:font];
}
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit