Skip to content

Commit

Permalink
Removal allowed for menu bar item
Browse files Browse the repository at this point in the history
  • Loading branch information
rxhanson committed Apr 9, 2021
1 parent 4dbf76b commit f637550
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Rectangle/RectangleStatusItem.swift
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ class RectangleStatusItem {
nsStatusItem = NSStatusBar.system.statusItem(withLength: NSStatusItem.variableLength)
nsStatusItem?.menu = self.statusMenu
nsStatusItem?.button?.image = NSImage(named: "StatusTemplate")
if #available(OSX 10.12, *) {
nsStatusItem?.behavior = .removalAllowed
}
}

private func remove() {
Expand Down

0 comments on commit f637550

Please sign in to comment.