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.
Also when NSMenu
selected it look as expected:
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
}