I would like to display an icon and some texts to its right on a NSStatusBar.
The code I'm using, as seen below, displays the icon and the text overlapping.
This is an example of I'm trying to emulate:
And here's my current code for reference:
let statusItem = NSStatusBar.system.statusItem(withLength:NSStatusItem.variableLength)
var preferencesWindow: NSWindowController?
func applicationDidFinishLaunching(_ aNotification: Notification) {
if let button = statusItem.button {
button.image = NSImage(named:NSImage.Name("StatusBarButtonImage"))
button.title = "..."
}
initMenu()
}
