macOS Dark Mode and NSAboutPanelOptionCredits

900 Views Asked by At

I have a fairly straight forward App called Range in the app store that I want to make dark mode compliant for macOS 10.14. I've noticed is that the About window is not changing all of the text colors.

I'm using the NSAboutPanelOptionCredits where I just need to bundle a Credits.rtf file and the app handles the rest.

https://developer.apple.com/documentation/appkit/nsaboutpaneloptioncredits?language=objc

Problem is, when I change to dark mode, the text in the file remains black, while the other auto-included text changes to white (app name, version etc...) I've opened up the .rtf file and there is no Inherit setting, or anything of the sort.

Any idea what I'm doing wrong, and/or missing?

Appreciate any thoughts. Thanks!

Light about window Dark about window

3

There are 3 best solutions below

0
On BEST ANSWER

The trick is to use semantic colors.

Using Xcode, edit your RTF file. Select the text and bring up the text color picker.

Xcode adds the Developer colors to the color picker. Select the appropriate semantic color for your text; I tend to use labelColor, secondaryLabelColor, and linkColor.

When you switch to dark mode, these semantic colors change appropriately.

0
On

The 10.14 AppKit Release Notes may be helpful:

Appearance-Aware Credits

You make the credits area match the appearance of an app by supplying the credits as an attributed string or by placing a Credits.rtf or Credits.rtfd in your app's bundle. Use the proper system colors, like textColor, linkColor, and labelColor, to make text display correctly in any appearance. If you use .rtf or .rtfd files to supply text for the credits area, the file must be saved using macOS 10.14 (beta 5 or later) to receive the appearance-aware treatment. If you create the file .rtf or .rtfd files on an earlier version of macOS, the appearance-aware treatment is only applied if the file contains only black text with no background color.

0
On

for whom needs it.. enter image description here

when opens:

enter image description here