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:
parent
9013779f71
commit
788927edb3
@ -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)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user