1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-24 08:43:27 +00:00

revert MessageWindowController changes

This commit is contained in:
Mitchell Livingston 2012-09-06 03:25:52 +00:00
parent 723d681b63
commit 781776dd69

View file

@ -292,26 +292,7 @@
NSTableColumn * column = [tableView tableColumnWithIdentifier: @"Message"];
const CGFloat count = floorf([message sizeWithAttributes: fAttributes].width / [column width]);
const CGFloat oldHeight = [tableView rowHeight] * (count + 1.0);
NSLog(@"oldHeight: %f", oldHeight);
NSAttributedString * attributedMessage = [[NSAttributedString alloc] initWithString: message attributes: fAttributes];
CTFramesetterRef framesetter = CTFramesetterCreateWithAttributedString((CFAttributedStringRef)attributedMessage);
[attributedMessage release];
const CGSize size = CTFramesetterSuggestFrameSizeWithConstraints(framesetter, CFRangeMake(0, 0), NULL, CGSizeMake([column width], CGFLOAT_MAX), NULL);
CFRelease(framesetter);
NSLog(@"new %@", NSStringFromSize(size));
//NSLog(@"%@", fAttributes);
CGFloat newHeight = size.height;
//not sure why this is needed
const CGFloat numRows = newHeight / 13.0;
newHeight += numRows * 1.0;
return newHeight;
return [tableView rowHeight] * (count + 1.0);
}
- (void) tableView: (NSTableView *) tableView sortDescriptorsDidChange: (NSArray *) oldDescriptors