After an upgrade from Catalina to Big Sur I noticed a bug in an app I develop. At certain scenario its icon in the menu bar shall change to NSColor.systemRed. However, instead of tinting the icon to the requested color, it appears black, regardless the requested color or dark theme being turned on/off. The same behavior is observed for the button’s title.
A minimal repro:
let statusItem = NSStatusBar.system.statusItem(withLength: NSStatusItem.variableLength)
statusItem.button?.title = "x"
statusItem.button?.contentTintColor = NSColor.systemRed // or any other color, results in black tint
Tinting statusItem.button used to work in Catalina. I assume this is a bug, but maybe it’s something that changed in Big Sur and is not quite documented yet? Or maybe I missed something in the release notes. There's a NSStatusItem mention but it doesn't seem related: https://developer.apple.com/documentation/macos-release-notes/appkit-release-notes-for-macos-11#NSStatusItem