use mone font for delay display

This commit is contained in:
yicheng 2020-04-25 18:09:01 +08:00
parent 69e344b14c
commit d6ad8d8204
2 changed files with 2 additions and 2 deletions

View File

@ -35,7 +35,7 @@ class ProxyItemView: MenuItemBaseView {
delayLabel.translatesAutoresizingMaskIntoConstraints = false
nameLabel.font = type(of: self).labelFont
delayLabel.font = NSFont.menuBarFont(ofSize: 11)
delayLabel.font = NSFont.monospacedDigitSystemFont(ofSize: 11, weight: .regular)
nameLabel.alignment = .left
delayLabel.alignment = .right

View File

@ -112,7 +112,7 @@ extension ProxyMenuItem {
attributed.addAttributes(hackAttr, range: NSRange(name.utf16.count..<name.utf16.count + 1))
if delay != nil {
let delayAttr = [NSAttributedString.Key.font: NSFont.menuBarFont(ofSize: 12)]
let delayAttr = [NSAttributedString.Key.font: NSFont.monospacedDigitSystemFont(ofSize: 12, weight: .regular)]
attributed.addAttributes(delayAttr, range: NSRange(name.utf16.count + 1..<str.utf16.count))
}
return attributed