Disable NSVisualEffectView in Source List NSTableView

2.1k Views Asked by At

I have an older application that has a specific appearance based on NSCell-based NSTableView having Source List highlighting. Unfortunately, on Yosemite this adds the NSVisualEffectView vibrancy under the selected cell which breaks the appearance in an unpleasant way.

I can't find a way to opt-out of this behaviour, unfortunately. Setting Regular highlighting breaks the appearance in another way (grey selection instead of blue).

Any idea if there is a way to opt-out of this behaviour on 10.10?

2

There are 2 best solutions below

3
On

You need to change table view appearance from NSAppearanceNameVibrantLight to NSAppearanceNameAqua. If you're targeting OS X 10.8 or earlier try setting the appearance by editing XIB file directly:

<tableView appearanceType="aqua" ...>

Also make sure that table view background color is set to Default in IB.

0
On

I don't know if it works for your case, but the best way to disable an implicit visual effect view is to just embed your NSTable/OutlineView in another NSVisualEffectView and set that views state to inactive

visualEffectView.state = .inactive