Index: macosx/PeerProgressIndicatorCell.h =================================================================== --- macosx/PeerProgressIndicatorCell.h (revision 3202) +++ macosx/PeerProgressIndicatorCell.h (working copy) @@ -27,6 +27,7 @@ @interface PeerProgressIndicatorCell : NSLevelIndicatorCell { BOOL fIsHidden; + NSUserDefaults *fDefaults; NSImage * fCheckImage; } @end Index: macosx/PeerProgressIndicatorCell.m =================================================================== --- macosx/PeerProgressIndicatorCell.m (revision 3202) +++ macosx/PeerProgressIndicatorCell.m (working copy) @@ -41,18 +41,45 @@ if (!fIsHidden) { [super drawWithFrame: cellFrame inView: controlView]; - if ([self floatValue] >= 1.0) + if (!fDefaults) { - if (!fCheckImage) + fDefaults = [NSUserDefaults standardUserDefaults]; + } + + if ([fDefaults boolForKey:@"DisplayPeerPercentage"]) + { + NSMutableParagraphStyle *centeredStyle = [[[NSMutableParagraphStyle alloc] init] autorelease]; + [centeredStyle setAlignment:NSCenterTextAlignment]; + + [[NSString stringWithFormat:@"%.1f", [self floatValue] * 100] + drawInRect:cellFrame + withAttributes: + [NSDictionary dictionaryWithObjects: + [NSArray arrayWithObjects: + [NSFont systemFontOfSize:[NSFont smallSystemFontSize]], + centeredStyle, + nil] + forKeys: + [NSArray arrayWithObjects: + NSFontAttributeName, + NSParagraphStyleAttributeName, + nil]]]; + } + else + { + if ([self floatValue] >= 1.0) { - fCheckImage = [NSImage imageNamed: @"CompleteCheck.png"]; - [fCheckImage setFlipped: YES]; + if (!fCheckImage) + { + fCheckImage = [NSImage imageNamed: @"CompleteCheck.png"]; + [fCheckImage setFlipped: YES]; + } + + NSSize imageSize = [fCheckImage size]; + NSRect rect = NSMakeRect(cellFrame.origin.x + (cellFrame.size.width - imageSize.width) * 0.5, + cellFrame.origin.y + (cellFrame.size.height - imageSize.height) * 0.5, imageSize.width, imageSize.height); + [fCheckImage drawInRect: rect fromRect: NSZeroRect operation: NSCompositeSourceOver fraction: 1.0]; } - - NSSize imageSize = [fCheckImage size]; - NSRect rect = NSMakeRect(cellFrame.origin.x + (cellFrame.size.width - imageSize.width) * 0.5, - cellFrame.origin.y + (cellFrame.size.height - imageSize.height) * 0.5, imageSize.width, imageSize.height); - [fCheckImage drawInRect: rect fromRect: NSZeroRect operation: NSCompositeSourceOver fraction: 1.0]; } } } Index: macosx/en.lproj/PrefsWindow.nib/info.nib =================================================================== --- macosx/en.lproj/PrefsWindow.nib/info.nib (revision 3202) +++ macosx/en.lproj/PrefsWindow.nib/info.nib (working copy) @@ -3,17 +3,17 @@ IBDocumentLocation - 32 103 356 240 0 0 1680 1028 + 22 70 356 240 0 0 1280 778 IBEditorPositions 153 - 558 568 563 268 0 0 1680 1028 + 358 386 563 268 0 0 1280 778 28 - 558 545 563 314 0 0 1680 1028 + 358 363 563 314 0 0 1280 778 41 - 558 550 563 305 0 0 1680 1028 + 243 341 563 342 0 0 1280 778 66 - 558 578 563 249 0 0 1680 1028 + 358 395 563 249 0 0 1280 778 IBFramework Version 446.1 @@ -24,8 +24,11 @@ IBOpenObjects 66 + 41 + 153 + 28 IBSystem Version - 8R4031 + 8R2218 Index: macosx/en.lproj/PrefsWindow.nib/keyedobjects.nib =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: macosx/Controller.m =================================================================== --- macosx/Controller.m (revision 3202) +++ macosx/Controller.m (working copy) @@ -225,7 +225,7 @@ //set table size if ([fDefaults boolForKey: @"SmallView"]) [fTableView setRowHeight: ROW_HEIGHT_SMALL]; - + //window min height NSSize contentMinSize = [fWindow contentMinSize]; contentMinSize.height = [[fWindow contentView] frame].size.height - [fScrollView frame].size.height