You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
765 B
26 lines
765 B
6 years ago
|
// Copyright © 2015 Abhishek Banthia
|
||
|
|
||
|
import Cocoa
|
||
|
|
||
|
class ParentViewController: NSViewController {
|
||
|
override func viewDidLoad() {
|
||
|
super.viewDidLoad()
|
||
|
if let view = view as? ParentView {
|
||
|
view.wantsLayer = true
|
||
|
}
|
||
|
|
||
|
preferredContentSize = NSMakeSize(view.frame.size.width, view.frame.size.height)
|
||
|
}
|
||
|
}
|
||
|
|
||
|
class ParentView: NSView {
|
||
|
override func updateLayer() {
|
||
|
super.updateLayer()
|
||
|
layer?.backgroundColor = Themer.shared().mainBackgroundColor().cgColor
|
||
|
|
||
|
if let controller = window?.windowController?.contentViewController as? PermissionsViewController {
|
||
|
[controller.calendarContainerView, controller.remindersContainerView].forEach { $0?.applyShadow() }
|
||
|
}
|
||
|
}
|
||
|
}
|