1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-26 01:27:28 +00:00

make sure to retain the attributes dictionary

This commit is contained in:
Mitchell Livingston 2007-09-28 13:05:01 +00:00
parent f5bd7f17ce
commit dc7a374fb3

View file

@ -42,11 +42,8 @@
{
if ([[NSUserDefaults standardUserDefaults] boolForKey: @"DisplayPeerProgressBarNumber"])
{
NSMutableParagraphStyle *centeredStyle = [[[NSMutableParagraphStyle alloc] init] autorelease];
[centeredStyle setAlignment:NSCenterTextAlignment];
if (!fAttributes)
fAttributes = [NSDictionary dictionaryWithObject: [NSFont systemFontOfSize: 11.0] forKey: NSFontAttributeName];
fAttributes = [[NSDictionary alloc] initWithObjectsAndKeys: [NSFont systemFontOfSize: 11.0], NSFontAttributeName, nil];
[[NSString stringWithFormat: @"%.1f%%", [self floatValue] * 100.0] drawInRect: cellFrame withAttributes: fAttributes];
}
else