mirror of
https://github.com/Toxblh/MTMR.git
synced 2026-01-10 00:58:37 +00:00
CurrencyBarItem: fix text vertical alignment
This commit is contained in:
parent
58e4160649
commit
67aaa2abf4
@ -123,7 +123,7 @@ class CurrencyBarItem: CustomButtonTouchBarItem {
|
||||
}
|
||||
|
||||
let regularFont = attributedTitle.attribute(.font, at: 0, effectiveRange: nil) as? NSFont ?? NSFont.systemFont(ofSize: 15)
|
||||
let newTitle = NSMutableAttributedString(string: title as String, attributes: [.foregroundColor: color, .font: regularFont])
|
||||
let newTitle = NSMutableAttributedString(string: title as String, attributes: [.foregroundColor: color, .font: regularFont, .baselineOffset: 1])
|
||||
newTitle.setAlignment(.center, range: NSRange(location: 0, length: title.count))
|
||||
attributedTitle = newTitle
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user