Skip to content

Commit

Permalink
Increase minimum menu width. Closes #24
Browse files Browse the repository at this point in the history
  • Loading branch information
p0deje committed Aug 25, 2019
1 parent fc2d733 commit a5b9c25
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Maccy/Menu.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,16 @@ class Menu: NSMenu, NSMenuDelegate {
public let maxHotKey = 9
public var allItems: [NSMenuItem] = []

private let menuWidth = 300

required init(coder decoder: NSCoder) {
super.init(coder: decoder)
}

override init(title: String) {
super.init(title: title)
self.delegate = self
self.minimumWidth = 220
self.minimumWidth = CGFloat(menuWidth)
}

func menuWillOpen(_ menu: NSMenu) {
Expand All @@ -27,7 +29,7 @@ class Menu: NSMenu, NSMenuDelegate {
}

func addSearchItem() {
let headerItemView = FilterMenuItemView(frame: NSRect(x: 0, y: 0, width: 20, height: 29))
let headerItemView = FilterMenuItemView(frame: NSRect(x: 0, y: 0, width: menuWidth, height: 29))
headerItemView.title = title

let headerItem = NSMenuItem()
Expand Down

0 comments on commit a5b9c25

Please sign in to comment.