4

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?

Jacob Gorban
  • 1,431
  • 1
  • 9
  • 15

2 Answers2

2

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.

pointum
  • 2,987
  • 24
  • 31
  • 1
    I target even OS X 10.7. I edited the XIB directly but it doesn't help. Visual effect view for the selected cell is still created. :-/ – Jacob Gorban Feb 21 '15 at 01:02
  • Try settings appearance of enclosing scrollView as well. I've just checked out an older version of my code with 10.7 support to test this. These settings show no vibrancy: https://www.dropbox.com/s/of33qbhgj16su7g/aquatable.png – pointum Feb 22 '15 at 09:19
  • 1
    Still doesn't work for me for some reason. In the UI inspector I still see the NSVisualEffect view under the NSClipView. I tried removing it from the view hierarchy too but it has an even worse effect, since it appears that the table view itself is drawing white for the background of the selected cell and without the effect view it just stays white. Thanks for your kind help but I'll just leave it like this or try to work around it by not using Source List type for the table view. – Jacob Gorban Feb 23 '15 at 16:23
0

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