Emojis in NSStatusItem title are dark tinted when using Light Mode on Catalina

57 views Asked by At

When I try to use emojis in NSStatusItem title on macOS Catalina and below they get some kind of dark tint. But in Dark Mode it seems to look as expected in newer versions.

Side by side comparison of same code between macOS versions (image)

Also when NSMenu selected it look as expected: When selected (image)

Here is how I create it:

var sItem: NSStatusItem = NSStatusItem()

override func viewDidLoad() {
    sItem = NSStatusBar.system.statusItem(withLength: NSStatusItem.variableLength)
    self.sItem.button!.title = " " + outsideTemp + "°C    " + roomTemp + "°C"
}
func setupMenu() {
    // Initialize the menu items
    let menu = NSMenu()
        
    menu.addItem(NSMenuItem(title: "Open in browser", action: #selector(AppDelegate.openInBrowser(_:)), keyEquivalent: "o"))
        
    menu.addItem(notifyEnabler)
    menu.addItem(NSMenuItem.separator())
    menu.addItem(NSMenuItem(title: "Quit tempApplet", action: #selector(NSApplication.terminate(_:)), keyEquivalent: "q"))
        
    sItem.menu = menu
}
0

There are 0 answers