Context:
Dark Mode support in Cocoa is still not as good as it should be in macOS 10.14.2.
Problem:
Let's say I have a window "Window" with some subviews including a custom view "View".
"View" uses - [NSString drawInRect:withAttributes:] to draw some strings within the drawRect: method. The NSForegroundColorAttributeName attribute is set to [NSColor tertiaryLabelColor]
State A:
"Window" effective appearance is the current OS appearance.
"View" effective appearance is the current OS appearance.
"View" is drawn correctly.
State B:
Now let's set "View" effective appearance to the opposite appearance of the current OS appearance (Light when Dark or Dark when Light).
Now, "View" is drawn incorrectly. The alpha channel is not correctly taken into account from what I'm observing.
Questions:
. Is there a workaround that does not involve embedding a NSTextField (or NSTextFieldCell)?
. Is there any hope for Cocoa to work correctly with Dark Mode before 2030?