didn't mean to commit some experimental, nonworking code; also, only create the string attributes when needed

This commit is contained in:
Mitchell Livingston
2007-09-28 12:58:31 +00:00
parent 6a976eed1c
commit f5bd7f17ce
3 changed files with 6 additions and 5 deletions

View File

@@ -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
{