mirror of
https://github.com/transmission/transmission
synced 2024-12-24 08:43:27 +00:00
revert MessageWindowController changes
This commit is contained in:
parent
723d681b63
commit
781776dd69
1 changed files with 1 additions and 20 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue