Don't highlight menu first item on popup

This commit is contained in:
Ivan Grachyov 2021-07-17 19:45:04 +03:00
parent 1594412b13
commit 8dd2a476f7

View File

@ -91,7 +91,7 @@ class AccountsListViewController: NSViewController {
var origin = sender.frame.origin var origin = sender.frame.origin
origin.x += sender.frame.width origin.x += sender.frame.width
origin.y += sender.frame.height origin.y += sender.frame.height
menu?.popUp(positioning: createItem, at: origin, in: view) menu?.popUp(positioning: nil, at: origin, in: view)
} }
@objc private func didClickCreateAccount() { @objc private func didClickCreateAccount() {
@ -194,7 +194,7 @@ extension AccountsListViewController: NSTableViewDelegate {
Timer.scheduledTimer(withTimeInterval: 0.01, repeats: false) { [weak self] _ in Timer.scheduledTimer(withTimeInterval: 0.01, repeats: false) { [weak self] _ in
var point = NSEvent.mouseLocation var point = NSEvent.mouseLocation
point.x += 1 point.x += 1
self?.tableView.menu?.popUp(positioning: tableView.menu?.items.first, at: point, in: nil) self?.tableView.menu?.popUp(positioning: nil, at: point, in: nil)
} }
} }
return true return true