Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions Rectangle/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ class AppDelegate: NSObject, NSApplicationDelegate {
: unauthorizedMenu

mainStatusMenu.autoenablesItems = false
addMenuIcons()
addWindowActionMenuItems()

NotificationCenter.default.addObserver(self, selector: #selector(rebuildMenu), name: .showAdditionalSizesInMenuChanged, object: nil)
Expand Down Expand Up @@ -130,6 +131,22 @@ class AppDelegate: NSObject, NSApplicationDelegate {
Notification.Name.appWillBecomeActive.post()
}

private func addMenuIcons() {
guard #available(macOS 11, *) else { return }
for item in mainStatusMenu.items {
switch item.action {
case #selector(openPreferences):
item.image = NSImage(systemSymbolName: "gear", accessibilityDescription: nil)
case #selector(viewLogging):
item.image = NSImage(systemSymbolName: "doc.text", accessibilityDescription: nil)
case #selector(checkForUpdates):
item.image = NSImage(systemSymbolName: "arrow.down.circle", accessibilityDescription: nil)
default:
break
}
}
}

func checkAutoCheckForUpdates() {
updaterController.updater.automaticallyChecksForUpdates = Defaults.SUEnableAutomaticChecks.enabled
}
Expand Down
Loading