mirror of
https://github.com/transmission/transmission.git
synced 2025-12-24 12:28:52 +00:00
more straightforward way to get string width for message window
This commit is contained in:
@@ -182,10 +182,7 @@
|
||||
if (!fAttributes)
|
||||
fAttributes = [[[[column dataCell] attributedStringValue] attributesAtIndex: 0 effectiveRange: NULL] retain];
|
||||
|
||||
NSAttributedString * string = [[NSAttributedString alloc] initWithString:
|
||||
[[fMessages objectAtIndex: row] objectForKey: @"Message"] attributes: fAttributes];
|
||||
count = [string size].width / width;
|
||||
[string release];
|
||||
count = [[[fMessages objectAtIndex: row] objectForKey: @"Message"] sizeWithAttributes: fAttributes].width / width;
|
||||
}
|
||||
|
||||
return [tableView rowHeight] * (float)(count+1);
|
||||
|
||||
Reference in New Issue
Block a user