diff --git a/MTMR/CustomButtonTouchBarItem.swift b/MTMR/CustomButtonTouchBarItem.swift index 636d3ce..01996ec 100644 --- a/MTMR/CustomButtonTouchBarItem.swift +++ b/MTMR/CustomButtonTouchBarItem.swift @@ -27,6 +27,7 @@ class CustomButtonTouchBarItem: NSCustomTouchBarItem, NSGestureRecognizerDelegat button.cell?.title = title button.title = title + button.bezelStyle = .rounded button.bezelColor = bezelColor self.view = button @@ -91,13 +92,22 @@ class CustomButtonCell: NSButtonCell { super.init(textCell: "") if backgroundColor != .clear { self.isBordered = true - self.bezelStyle = .rounded self.backgroundColor = backgroundColor } else { self.isBordered = false } } + override func highlight(_ flag: Bool, withFrame cellFrame: NSRect, in controlView: NSView) { + if flag { + controlView.layer?.masksToBounds = true + self.isBordered = true + } else { + self.isBordered = false + } + super.highlight(flag, withFrame: cellFrame, in: controlView) + } + required init(coder: NSCoder) { fatalError("init(coder:) has not been implemented") } diff --git a/MTMR/Info.plist b/MTMR/Info.plist index cd19220..3e1f8fb 100644 --- a/MTMR/Info.plist +++ b/MTMR/Info.plist @@ -26,8 +26,12 @@ NSHumanReadableCopyright Copyright © 2018 Anton Palgunov. All rights reserved. + NSLocationAlwaysUsageDescription + Weather widget need your location for correct work NSLocationUsageDescription - ... + Weather widget need your location for correct work + NSLocationWhenInUseUsageDescription + Weather widget need your location for correct work NSMainStoryboardFile Main NSPrincipalClass diff --git a/MTMR/TouchBarController.swift b/MTMR/TouchBarController.swift index c9a890b..945d464 100644 --- a/MTMR/TouchBarController.swift +++ b/MTMR/TouchBarController.swift @@ -208,6 +208,7 @@ class TouchBarController: NSObject, NSTouchBarDelegate { let button = item.button! button.imageScaling = .scaleProportionallyDown button.imagePosition = .imageLeading + button.imageHugsTitle = true button.cell?.image = source.image button.bezelColor = .clear }