From 453895f395256d913b0a8980081ef9fc4317a0f3 Mon Sep 17 00:00:00 2001 From: Serg Date: Mon, 30 Apr 2018 18:53:32 +0700 Subject: [PATCH] fix wrong title while first execution --- MTMR/TouchBarController.swift | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/MTMR/TouchBarController.swift b/MTMR/TouchBarController.swift index f31fd84..f08336f 100644 --- a/MTMR/TouchBarController.swift +++ b/MTMR/TouchBarController.swift @@ -219,7 +219,9 @@ class TouchBarController: NSObject, NSTouchBarDelegate { } if case .background(let color)? = item.additionalParameters[.background], let item = barItem as? CustomButtonTouchBarItem { if item.button.cell?.isBordered == false { - item.button.cell = NSButtonCell() + let newCell = NSButtonCell() + newCell.title = item.button.title + item.button.cell = newCell item.button.cell?.isBordered = true } item.button.bezelColor = color