From 6c45eff0666906f030aeb7e75760126781240075 Mon Sep 17 00:00:00 2001 From: Abhishek Date: Mon, 9 Aug 2021 22:26:26 -0500 Subject: [PATCH] Empty state. --- .../Upcoming Events/UpcomingEventViewItem.swift | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/Clocker/Panel/Upcoming Events/UpcomingEventViewItem.swift b/Clocker/Panel/Upcoming Events/UpcomingEventViewItem.swift index ea2c2c1..1906664 100644 --- a/Clocker/Panel/Upcoming Events/UpcomingEventViewItem.swift +++ b/Clocker/Panel/Upcoming Events/UpcomingEventViewItem.swift @@ -46,10 +46,21 @@ class UpcomingEventViewItem: NSCollectionViewItem { eventTitleLabel.stringValue = NSLocalizedString("See your next Calendar event here.", comment: "Next Event Label for no Calendar access") setCalendarButtonTitle(buttonTitle: NSLocalizedString("Click here to start.", comment: "Button Title for no Calendar access")) - calendarColorView.layer?.backgroundColor = NSColor.blue.cgColor + calendarColorView.layer?.backgroundColor = NSColor.systemBlue.cgColor zoomButton.image = Themer.shared().removeImage() panelDelegate = delegate } + + func setupEmptyState() { + if leadingConstraint.constant != 10 { + leadingConstraint.constant = 10 + } + + eventTitleLabel.stringValue = NSLocalizedString("No upcoming events for today!", comment: "Next Event Label with no upcoming event") + setCalendarButtonTitle(buttonTitle: NSLocalizedString("Inbox Zero!", comment: "Button Title for no upcoming event")) + calendarColorView.layer?.backgroundColor = NSColor.systemGreen.cgColor + zoomButton.image = Themer.shared().removeImage() + } private func setCalendarButtonTitle(buttonTitle: String) { let style = NSMutableParagraphStyle()