Search code examples
macosnsoutlineview

NSOutlineView - Disclosure Triangle Interferes with Highlight Rectangle


I have an NSOutlineView with the highlight mode set to source list and the menu property set to a non-empty menu (I figured this last consdition is necessary to have the outline drawn).

When I right-click on a row representing an item that has children (i.e., is expandable), The blue outline around the cell has a slightly different color right above and below the disclosure triangle:

enter image description here

(This happens for every node, at every level of the hierarchy)

Additional information: My outline view is view based, does not use bindings (view controller is the delegate and data source). Me cells are custom, designed on the storyboard, nothing fancy (icon image view and text field).

What can be causing this?


EDIT: The issue only appears with the round-cornerered highlight rectangle of the "Source List" highlight mode. With the straight-cornered rectangle of the "Regular" highlight mode, the stroke color is even all along.


Solution

  • When using the Source List style, your outline view has an NSVisualEffect view behind it, which causes the list to be composited differently. What you're seeing seems to be a bug with the vibrancy appearance. You could perhaps try to work around it by reducing the frame of the outline cell by overriding frameOfOutlineCell.