mirror of
https://github.com/transmission/transmission.git
synced 2025-12-24 12:28:52 +00:00
didn't mean to commit some experimental, nonworking code; also, only create the string attributes when needed
This commit is contained in:
@@ -27,6 +27,7 @@
|
||||
@interface PeerProgressIndicatorCell : NSLevelIndicatorCell
|
||||
{
|
||||
BOOL fIsHidden;
|
||||
NSDictionary * fAttributes;
|
||||
NSImage * fCheckImage;
|
||||
}
|
||||
|
||||
|
||||
@@ -45,9 +45,9 @@
|
||||
NSMutableParagraphStyle *centeredStyle = [[[NSMutableParagraphStyle alloc] init] autorelease];
|
||||
[centeredStyle setAlignment:NSCenterTextAlignment];
|
||||
|
||||
[[NSString stringWithFormat: @"%.1f%%", [self floatValue] * 100.0] drawInRect: cellFrame
|
||||
withAttributes: [NSDictionary dictionaryWithObjectsAndKeys:
|
||||
[NSFont systemFontOfSize: 11.0], NSFontAttributeName, nil]];
|
||||
if (!fAttributes)
|
||||
fAttributes = [NSDictionary dictionaryWithObject: [NSFont systemFontOfSize: 11.0] forKey: NSFontAttributeName];
|
||||
[[NSString stringWithFormat: @"%.1f%%", [self floatValue] * 100.0] drawInRect: cellFrame withAttributes: fAttributes];
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -270,7 +270,7 @@
|
||||
|
||||
if (rightWidth > 0)
|
||||
{
|
||||
if (![fDefaults boolForKey: @"DisplayProgressBarAvailable"])
|
||||
/*if (![fDefaults boolForKey: @"DisplayProgressBarAvailable"])
|
||||
{
|
||||
int notAvailableWidth = barRect.size.width * [torrent notAvailableDesired];
|
||||
//NSLog(@"notAvailableWidth %d rightWidth %d", notAvailableWidth, rightWidth);
|
||||
@@ -288,7 +288,7 @@
|
||||
fYellowGradient = [[CTGradient progressYellowGradient] retain];
|
||||
[fYellowGradient fillRect: notAvailableRect angle: -90];
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
if (rightWidth > 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user