more straightforward way to get string width for message window
This commit is contained in:
parent
8d70ac49c0
commit
84b10c4312
|
@ -182,10 +182,7 @@
|
||||||
if (!fAttributes)
|
if (!fAttributes)
|
||||||
fAttributes = [[[[column dataCell] attributedStringValue] attributesAtIndex: 0 effectiveRange: NULL] retain];
|
fAttributes = [[[[column dataCell] attributedStringValue] attributesAtIndex: 0 effectiveRange: NULL] retain];
|
||||||
|
|
||||||
NSAttributedString * string = [[NSAttributedString alloc] initWithString:
|
count = [[[fMessages objectAtIndex: row] objectForKey: @"Message"] sizeWithAttributes: fAttributes].width / width;
|
||||||
[[fMessages objectAtIndex: row] objectForKey: @"Message"] attributes: fAttributes];
|
|
||||||
count = [string size].width / width;
|
|
||||||
[string release];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return [tableView rowHeight] * (float)(count+1);
|
return [tableView rowHeight] * (float)(count+1);
|
||||||
|
|
Loading…
Reference in New Issue