NSOutlineView renders attributed strings incorrectly depending on their length

Originator:ivmirx
Number:rdar://29601717 Date Originated:09-Dec-2016
Status:Open Resolved:
Product:macOS + SDK Product Version:10.11.6 (15G1108)
Classification:Bug Reproducible:Yes
 
WORKAROUND: delete the default NSTextField (the one created by NSOutlineView) and create a new one. Re-attach the outlet in cell.

Summary:
When attributed string text is longer than 50% of NSTextField width in a row, NSOutlineView renders the whole field incorrectly.

Steps to Reproduce:
1. Setup a default view-based NSOutlineView
2. Setup - (NSView*)outlineView:(NSOutlineView*)outlineView viewForTableColumn:(NSTableColumn*)tableColumn item:(id)item
3. Return a new cellView with cellView.textField.attributedStringValue set to texts of different lengths

Expected Results:
All texts should render in the same style.

Actual Results:
Texts with width > 50% of cellView.textField width are rendered with a thinner font.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!