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

and fix empty keyboard layout widget too

This commit is contained in:
Serg 2018-05-10 22:41:44 +07:00
parent 961d11a49a
commit 20dd337493

View File

@ -55,6 +55,7 @@ class CustomButtonTouchBarItem: NSCustomTouchBarItem, NSGestureRecognizerDelegat
private func reinstallButton() { private func reinstallButton() {
let title = button.attributedTitle let title = button.attributedTitle
let image = button.image
let cell = CustomButtonCell() let cell = CustomButtonCell()
button.cell = cell button.cell = cell
if let color = backgroundColor { if let color = backgroundColor {
@ -66,6 +67,7 @@ class CustomButtonTouchBarItem: NSCustomTouchBarItem, NSGestureRecognizerDelegat
button.bezelStyle = isBordered ? .rounded : .inline button.bezelStyle = isBordered ? .rounded : .inline
} }
button.attributedTitle = title button.attributedTitle = title
button.image = image
self.view = button self.view = button
} }