Skip to content

Commit

Permalink
perf: menubar takes a few frame less to compute
Browse files Browse the repository at this point in the history
  • Loading branch information
lwouis committed Sep 4, 2020
1 parent cbc4c39 commit 3b7350f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/ui/Menubar.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ class Menubar {
static func initialize() {
statusItem = NSStatusBar.system.statusItem(withLength: NSStatusItem.squareLength)
statusItem.menu = NSMenu()
statusItem.menu!.title = App.name // perf: prevent going through expensive code-path within appkit
statusItem.menu!.addItem(
withTitle: String(format: NSLocalizedString("About %@", comment: "Menubar option. %@ is AltTab"), App.name),
action: #selector(App.app.showAboutTab),
Expand Down

0 comments on commit 3b7350f

Please sign in to comment.