I have a status bar application. The problem is that my icon stay white at all times. Is there a way to make it go white on dark background and black on light backgrounds. I notice that must status bar apps have this feature
class AppDelegate: NSObject, NSApplicationDelegate {
static private(set) var instance: AppDelegate!
lazy var statusBarItem = NSStatusBar.system.statusItem(withLength: NSStatusItem.variableLength)
let menu = ApplicationMenu()
func applicationDidFinishLaunching(_ notification: Notification) {
AppDelegate.instance = self
statusBarItem.button?.image = NSImage(named: NSImage.Name("E22"))
statusBarItem.button?.imagePosition = .imageLeading
statusBarItem.menu = menu.createMenu()
}
}