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

+ highlighting button background on press

This commit is contained in:
ad 2018-04-30 00:57:09 +03:00
parent 9013779f71
commit 788927edb3
2 changed files with 3 additions and 1 deletions

View File

@ -101,6 +101,8 @@ class CustomButtonCell: NSButtonCell {
override func highlight(_ flag: Bool, withFrame cellFrame: NSRect, in controlView: NSView) { override func highlight(_ flag: Bool, withFrame cellFrame: NSRect, in controlView: NSView) {
if flag { if flag {
self.isBordered = true self.isBordered = true
} else {
self.isBordered = false
} }
super.highlight(flag, withFrame: cellFrame, in: controlView) super.highlight(flag, withFrame: cellFrame, in: controlView)
} }

View File

@ -10,7 +10,7 @@ class ScrollViewItem: NSCustomTouchBarItem {
stackView.orientation = .horizontal stackView.orientation = .horizontal
let scrollView = NSScrollView(frame: CGRect(origin: .zero, size: stackView.fittingSize)) let scrollView = NSScrollView(frame: CGRect(origin: .zero, size: stackView.fittingSize))
scrollView.documentView = stackView 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 self.view = scrollView
} }