From 788927edb3efd9c8f7f0cdc529a6ede7c1066b7e Mon Sep 17 00:00:00 2001 From: ad Date: Mon, 30 Apr 2018 00:57:09 +0300 Subject: [PATCH] + highlighting button background on press --- MTMR/CustomButtonTouchBarItem.swift | 2 ++ MTMR/ScrollViewItem.swift | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/MTMR/CustomButtonTouchBarItem.swift b/MTMR/CustomButtonTouchBarItem.swift index dd22d50..300e8fe 100644 --- a/MTMR/CustomButtonTouchBarItem.swift +++ b/MTMR/CustomButtonTouchBarItem.swift @@ -101,6 +101,8 @@ class CustomButtonCell: NSButtonCell { override func highlight(_ flag: Bool, withFrame cellFrame: NSRect, in controlView: NSView) { if flag { self.isBordered = true + } else { + self.isBordered = false } super.highlight(flag, withFrame: cellFrame, in: controlView) } diff --git a/MTMR/ScrollViewItem.swift b/MTMR/ScrollViewItem.swift index 850039b..c4fc12c 100644 --- a/MTMR/ScrollViewItem.swift +++ b/MTMR/ScrollViewItem.swift @@ -10,7 +10,7 @@ class ScrollViewItem: NSCustomTouchBarItem { stackView.orientation = .horizontal let scrollView = NSScrollView(frame: CGRect(origin: .zero, size: stackView.fittingSize)) scrollView.documentView = stackView - scrollView.documentView?.bounds.origin = CGPoint(x: 0.0, y: -2.5) +// scrollView.documentView?.bounds.origin = CGPoint(x: 0.0, y: -2.5) self.view = scrollView }