I'm aware that you must have a solid background color behind a NSTextField when using Core Animation layers (CALayer) as sub-pixel is not supported, however I need to use a NSVisualEffectView
behind my NSOutlineView
and I'm using several NSTextFields on top. If I set wantsLayer
to YES for the NSOutlineView
, sadly the text on top becomes poorly aliased. How can I get the nice blur AND smooth text on top? Does this mean we can't use CALayer
at all when using NSVisualEffectView
as it's superview?
Asked
Active
Viewed 1,091 times
11

strangetimes
- 4,953
- 1
- 34
- 62
-
I've tried something similar and had all sorts of rendering problems with text fields on a effects view. However I changed to the source list style (which sets up the effects view automatically) and this solved all the display problems, at least in my case. Might be worth a try. – Daniel Farrell Dec 21 '14 at 19:45
-
1Apparently there are known font smoothing issues in 10.10 and this isn't possible to do till it's fixed. – strangetimes Jan 14 '15 at 21:39
-
Oh interesting. Do you have a reference for that, I'd like to read more. – Daniel Farrell Jan 14 '15 at 21:41
-
1I got a reply from Corbin (Apple) on dev forums for this question saying there are known issues with text smoothing although inside a Visual Effects view it should work, but he pointed out this could be a bug (as I've found other known bugs with visual effects view when used with a NSSplitView) – strangetimes Jan 15 '15 at 22:07
-
Oh I'll take a look at the apple lists. Thanks! – Daniel Farrell Jan 15 '15 at 22:08
-
I can second this bug. I'm using NSTextField on top of a NSVisualEffectView, it renders its text very strangely when within a selected NSTableViewRow. – Lars Blumberg May 11 '16 at 16:26
-
@strangetimes Is it fixed? I got similar in 2018 =( Smoothing does not work for CALayered subviews. NSButton and NSTextField. – Nuzhdin Vladimir May 17 '18 at 12:57
-
@ZevsVU not quite - just try and make sure anything with text inside is backed by an opaque solid background. A standard NSTextField inside of NSVisuaEffectView should mostly work as long as you're not doing anything 'customized' inside. There are limitations in how it renders text on macOS compared to iOS. – strangetimes May 19 '18 at 12:55