NSOutlineView disclosure triangle vertically off center

Viewed 806

I'm working with an NSOutlineView on a macOS app and it provides disclosure triangles for items that can be expanded.

I'm also creating custom NSTableCellView items rather than using basic cell items. This allows me to create the cell how I want visually.

My issue is that when they're displayed, the disclosure triangle on the left is not centered vertically.

enter image description here

Notice how the disclosure triangles are not aligned properly. They're a bit lower than they should be. If you scroll away and come back, sometimes, they automatically align themselves correctly. Has anyone been able to fix this issue before?

For what it's worth, I'm using the following code as well for the cells.

self.outlineView.rowHeight = CGFloat(integerLiteral: 66)
self.outlineView.usesAutomaticRowHeights = true
1 Answers
Related