Ignore:
Timestamp:
Sep 6, 2012, 3:25:52 AM (10 years ago)
Author:
livings124
Message:

revert MessageWindowController? changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/MessageWindowController.m

    r13469 r13471  
    293293    const CGFloat count = floorf([message sizeWithAttributes: fAttributes].width / [column width]);
    294294   
    295     const CGFloat oldHeight = [tableView rowHeight] * (count + 1.0);
    296     NSLog(@"oldHeight: %f", oldHeight);
    297    
    298     NSAttributedString * attributedMessage = [[NSAttributedString alloc] initWithString: message attributes: fAttributes];
    299     CTFramesetterRef framesetter = CTFramesetterCreateWithAttributedString((CFAttributedStringRef)attributedMessage);
    300     [attributedMessage release];
    301    
    302     const CGSize size = CTFramesetterSuggestFrameSizeWithConstraints(framesetter, CFRangeMake(0, 0), NULL, CGSizeMake([column width], CGFLOAT_MAX), NULL);
    303     CFRelease(framesetter);
    304    
    305     NSLog(@"new %@", NSStringFromSize(size));
    306     //NSLog(@"%@", fAttributes);
    307    
    308     CGFloat newHeight = size.height;
    309    
    310     //not sure why this is needed
    311     const CGFloat numRows = newHeight / 13.0;
    312     newHeight += numRows * 1.0;
    313    
    314     return newHeight;
     295    return [tableView rowHeight] * (count + 1.0);
    315296}
    316297
Note: See TracChangeset for help on using the changeset viewer.