Changeset 13471 for trunk/macosx/MessageWindowController.m
- Timestamp:
- Sep 6, 2012, 3:25:52 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/macosx/MessageWindowController.m
r13469 r13471 293 293 const CGFloat count = floorf([message sizeWithAttributes: fAttributes].width / [column width]); 294 294 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); 315 296 } 316 297
Note: See TracChangeset
for help on using the changeset viewer.