1
0
mirror of https://github.com/Toxblh/MTMR.git synced 2026-01-10 17:08:39 +00:00

CurrencyBarItem: fix text vertical alignment

This commit is contained in:
bobrosoft 2019-07-27 18:10:48 +02:00
parent 58e4160649
commit 67aaa2abf4

View File

@ -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
}