FIX: Replaced statusbar to show icon instead of string.

This commit is contained in:
Etienne Roesch 2025-04-02 18:37:29 +01:00
parent d3b066218f
commit 80cddb0314

View file

@ -90,8 +90,15 @@ class AppDelegate: NSObject, NSApplicationDelegate {
window.makeKeyAndOrderFront(nil)
if let button = statusBarItem.button {
button.title = "MSG"
//button.title = "MSG"
button.toolTip = "MSG App"
if let image = NSImage(named: "AppIcon") {
let newSize = NSSize(width: 18, height: 18)
image.size = newSize
image.isTemplate = true // Important: so it adapts to dark/light mode but we need to get B&W icons..
button.image = image
}
button.target = self
}
let menu = NSMenu()