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.

39 lines
1.3 KiB

// Copyright © 2015 Abhishek Banthia
import Foundation
var avenirLightFont: NSFont {
if let avenirFont = NSFont(name: "Avenir-Light", size: 12) {
return avenirFont
}
return NSFont.systemFont(ofSize: 12)
}
3 years ago
protocol UpcomingEventPanelDelegate: AnyObject {
3 years ago
func didRemoveCalendarView()
func didClickSupplementaryButton(_ sender: NSButton)
3 years ago
}
extension ParentPanelController {
func setupUpcomingEventViewCollectionViewIfNeccesary() {
if upcomingEventCollectionView != nil {
3 years ago
upcomingEventsDataSource = UpcomingEventsDataSource(self, EventCenter.sharedCenter())
3 years ago
upcomingEventCollectionView.enclosingScrollView?.scrollerInsets = NSEdgeInsetsZero
upcomingEventCollectionView.enclosingScrollView?.backgroundColor = NSColor.clear
upcomingEventCollectionView.setAccessibility("UpcomingEventCollectionView")
upcomingEventCollectionView.dataSource = upcomingEventsDataSource
upcomingEventCollectionView.delegate = upcomingEventsDataSource
}
}
}
3 years ago
extension ParentPanelController: UpcomingEventPanelDelegate {
3 years ago
func didRemoveCalendarView() {
removeUpcomingEventView()
}
func didClickSupplementaryButton(_ sender: NSButton) {
calendarButtonAction(sender)
}
3 years ago
}