diff --git a/Clocker/Clocker/ca.lproj/Localizable.strings b/Clocker/Clocker/ca.lproj/Localizable.strings index eb4fd3b..941b9db 100644 --- a/Clocker/Clocker/ca.lproj/Localizable.strings +++ b/Clocker/Clocker/ca.lproj/Localizable.strings @@ -161,3 +161,5 @@ "Daylights Saving transition will occur in < 24 hours" = "Daylights Saving transition will occur in < 24 hours"; "Copied to Clipboard" = "Copied to Clipboard"; +"No upcoming events for today!" = "No upcoming events for today!"; +"Great going." = "Great going."; diff --git a/Clocker/Clocker/de.lproj/Localizable.strings b/Clocker/Clocker/de.lproj/Localizable.strings index 6269afd..9a73dd9 100644 --- a/Clocker/Clocker/de.lproj/Localizable.strings +++ b/Clocker/Clocker/de.lproj/Localizable.strings @@ -161,3 +161,5 @@ "Daylights Saving transition will occur in < 24 hours" = "Daylights Saving transition will occur in < 24 hours"; "Copied to Clipboard" = "Copied to Clipboard"; +"No upcoming events for today!" = "No upcoming events for today!"; +"Great going." = "Great going."; diff --git a/Clocker/Clocker/en.lproj/Localizable.strings b/Clocker/Clocker/en.lproj/Localizable.strings index f2b6950..e535c0a 100644 --- a/Clocker/Clocker/en.lproj/Localizable.strings +++ b/Clocker/Clocker/en.lproj/Localizable.strings @@ -163,3 +163,5 @@ "Daylights Saving transition will occur in < 24 hours" = "Daylights Saving transition will occur in < 24 hours"; "Copied to Clipboard" = "Copied to Clipboard"; +"No upcoming events for today!" = "No upcoming events for today!"; +"Great going." = "Great going."; diff --git a/Clocker/Clocker/en.lproj/Panel.xib b/Clocker/Clocker/en.lproj/Panel.xib index c61de2f..5212f98 100755 --- a/Clocker/Clocker/en.lproj/Panel.xib +++ b/Clocker/Clocker/en.lproj/Panel.xib @@ -261,7 +261,7 @@ - + diff --git a/Clocker/Clocker/es.lproj/Localizable.strings b/Clocker/Clocker/es.lproj/Localizable.strings index 47d6fa9..3b60106 100644 --- a/Clocker/Clocker/es.lproj/Localizable.strings +++ b/Clocker/Clocker/es.lproj/Localizable.strings @@ -163,3 +163,5 @@ "Daylights Saving transition will occur in < 24 hours" = "Daylights Saving transition will occur in < 24 hours"; "Copied to Clipboard" = "Copied to Clipboard"; +"No upcoming events for today!" = "No upcoming events for today!"; +"Great going." = "Great going.";s diff --git a/Clocker/Clocker/fr.lproj/Localizable.strings b/Clocker/Clocker/fr.lproj/Localizable.strings index e823d0b..c17269c 100644 --- a/Clocker/Clocker/fr.lproj/Localizable.strings +++ b/Clocker/Clocker/fr.lproj/Localizable.strings @@ -162,3 +162,5 @@ "Daylights Saving transition will occur in < 24 hours" = "Daylights Saving transition will occur in < 24 hours"; "Copied to Clipboard" = "Copied to Clipboard"; +"No upcoming events for today!" = "No upcoming events for today!"; +"Great going." = "Great going."; diff --git a/Clocker/Clocker/hi.lproj/Localizable.strings b/Clocker/Clocker/hi.lproj/Localizable.strings index 451dfc2..ab3fd08 100644 --- a/Clocker/Clocker/hi.lproj/Localizable.strings +++ b/Clocker/Clocker/hi.lproj/Localizable.strings @@ -157,3 +157,5 @@ "Daylights Saving transition will occur in < 24 hours" = "Daylights Saving transition will occur in < 24 hours"; "Copied to Clipboard" = "Copied to Clipboard"; +"No upcoming events for today!" = "No upcoming events for today!"; +"Great going." = "Great going."; diff --git a/Clocker/Clocker/hr.lproj/Localizable.strings b/Clocker/Clocker/hr.lproj/Localizable.strings index 9974b2b..b6675e9 100644 --- a/Clocker/Clocker/hr.lproj/Localizable.strings +++ b/Clocker/Clocker/hr.lproj/Localizable.strings @@ -163,3 +163,5 @@ "Daylights Saving transition will occur in < 24 hours" = "Daylights Saving transition will occur in < 24 hours"; "Copied to Clipboard" = "Copied to Clipboard"; +"No upcoming events for today!" = "No upcoming events for today!"; +"Great going." = "Great going."; diff --git a/Clocker/Clocker/it.lproj/Localizable.strings b/Clocker/Clocker/it.lproj/Localizable.strings index 04adcc3..9963a29 100644 --- a/Clocker/Clocker/it.lproj/Localizable.strings +++ b/Clocker/Clocker/it.lproj/Localizable.strings @@ -162,3 +162,5 @@ "Daylights Saving transition will occur in < 24 hours" = "Daylights Saving transition will occur in < 24 hours"; "Copied to Clipboard" = "Copied to Clipboard"; +"No upcoming events for today!" = "No upcoming events for today!"; +"Great going." = "Great going."; diff --git a/Clocker/Clocker/ja.lproj/Localizable.strings b/Clocker/Clocker/ja.lproj/Localizable.strings index 53cdfea..0765375 100644 --- a/Clocker/Clocker/ja.lproj/Localizable.strings +++ b/Clocker/Clocker/ja.lproj/Localizable.strings @@ -161,3 +161,5 @@ "Daylights Saving transition will occur in < 24 hours" = "Daylights Saving transition will occur in < 24 hours"; "Copied to Clipboard" = "Copied to Clipboard"; +"No upcoming events for today!" = "No upcoming events for today!"; +"Great going." = "Great going."; diff --git a/Clocker/Clocker/ko.lproj/Localizable.strings b/Clocker/Clocker/ko.lproj/Localizable.strings index 50ba241..41f94b7 100644 --- a/Clocker/Clocker/ko.lproj/Localizable.strings +++ b/Clocker/Clocker/ko.lproj/Localizable.strings @@ -164,3 +164,5 @@ "Daylights Saving transition will occur in < 24 hours" = "Daylights Saving transition will occur in < 24 hours"; "Copied to Clipboard" = "Copied to Clipboard"; +"No upcoming events for today!" = "No upcoming events for today!"; +"Great going." = "Great going."; diff --git a/Clocker/Clocker/nl.lproj/Localizable.strings b/Clocker/Clocker/nl.lproj/Localizable.strings index eb4fd3b..941b9db 100644 --- a/Clocker/Clocker/nl.lproj/Localizable.strings +++ b/Clocker/Clocker/nl.lproj/Localizable.strings @@ -161,3 +161,5 @@ "Daylights Saving transition will occur in < 24 hours" = "Daylights Saving transition will occur in < 24 hours"; "Copied to Clipboard" = "Copied to Clipboard"; +"No upcoming events for today!" = "No upcoming events for today!"; +"Great going." = "Great going."; diff --git a/Clocker/Clocker/pt-BR.lproj/Localizable.strings b/Clocker/Clocker/pt-BR.lproj/Localizable.strings index ac6f642..aca7df1 100644 --- a/Clocker/Clocker/pt-BR.lproj/Localizable.strings +++ b/Clocker/Clocker/pt-BR.lproj/Localizable.strings @@ -162,3 +162,5 @@ "Daylights Saving transition will occur in < 24 hours" = "Daylights Saving transition will occur in < 24 hours"; "Copied to Clipboard" = "Copied to Clipboard"; +"No upcoming events for today!" = "No upcoming events for today!"; +"Great going." = "Great going."; diff --git a/Clocker/Clocker/ru.lproj/Localizable.strings b/Clocker/Clocker/ru.lproj/Localizable.strings index 08b025d..3ae406a 100644 --- a/Clocker/Clocker/ru.lproj/Localizable.strings +++ b/Clocker/Clocker/ru.lproj/Localizable.strings @@ -154,3 +154,5 @@ "Daylights Saving transition will occur in < 24 hours" = "Daylights Saving transition will occur in < 24 hours"; "Copied to Clipboard" = "Copied to Clipboard"; +"No upcoming events for today!" = "No upcoming events for today!"; +"Great going." = "Great going."; diff --git a/Clocker/Clocker/zh-Hans.lproj/Localizable.strings b/Clocker/Clocker/zh-Hans.lproj/Localizable.strings index 81dd154..94d81be 100644 --- a/Clocker/Clocker/zh-Hans.lproj/Localizable.strings +++ b/Clocker/Clocker/zh-Hans.lproj/Localizable.strings @@ -155,3 +155,5 @@ "Daylights Saving transition will occur in < 24 hours" = "Daylights Saving transition will occur in < 24 hours"; "Copied to Clipboard" = "Copied to Clipboard"; +"No upcoming events for today!" = "No upcoming events for today!"; +"Great going." = "Great going."; diff --git a/Clocker/Clocker/zh-Hant.lproj/Localizable.strings b/Clocker/Clocker/zh-Hant.lproj/Localizable.strings index e3cd452..661869d 100644 --- a/Clocker/Clocker/zh-Hant.lproj/Localizable.strings +++ b/Clocker/Clocker/zh-Hant.lproj/Localizable.strings @@ -162,3 +162,5 @@ "Daylights Saving transition will occur in < 24 hours" = "Daylights Saving transition will occur in < 24 hours"; "Copied to Clipboard" = "Copied to Clipboard"; +"No upcoming events for today!" = "No upcoming events for today!"; +"Great going." = "Great going."; diff --git a/Clocker/Panel/Upcoming Events/ParentPanelController+UpcomingEvents.swift b/Clocker/Panel/Upcoming Events/ParentPanelController+UpcomingEvents.swift index adcb5c0..e8e8c32 100644 --- a/Clocker/Panel/Upcoming Events/ParentPanelController+UpcomingEvents.swift +++ b/Clocker/Panel/Upcoming Events/ParentPanelController+UpcomingEvents.swift @@ -2,11 +2,11 @@ import Foundation -var avenirLightFont: NSFont { - if let avenirFont = NSFont(name: "Avenir-Light", size: 12) { +var avenirBookFont: NSFont { + if let avenirFont = NSFont(name: "Avenir-Book", size: 13) { return avenirFont } - return NSFont.systemFont(ofSize: 12) + return NSFont.systemFont(ofSize: 13) } protocol UpcomingEventPanelDelegate: AnyObject { diff --git a/Clocker/Panel/Upcoming Events/UpcomingEventViewItem.swift b/Clocker/Panel/Upcoming Events/UpcomingEventViewItem.swift index 7a3c2a4..9a0402e 100644 --- a/Clocker/Panel/Upcoming Events/UpcomingEventViewItem.swift +++ b/Clocker/Panel/Upcoming Events/UpcomingEventViewItem.swift @@ -57,7 +57,7 @@ class UpcomingEventViewItem: NSCollectionViewItem { } 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")) + setCalendarButtonTitle(buttonTitle: NSLocalizedString("Great going.", comment: "Button Title for no upcoming event")) calendarColorView.layer?.backgroundColor = NSColor.systemGreen.cgColor zoomButton.image = Themer.shared().removeImage() } @@ -66,7 +66,7 @@ class UpcomingEventViewItem: NSCollectionViewItem { let style = NSMutableParagraphStyle() style.alignment = .left style.lineBreakMode = .byTruncatingTail - + if let boldFont = NSFont(name: "Avenir", size: 11) { let attributes = [NSAttributedString.Key.foregroundColor: NSColor.gray, NSAttributedString.Key.paragraphStyle: style, NSAttributedString.Key.font: boldFont] diff --git a/Clocker/Panel/Upcoming Events/UpcomingEventViewItem.xib b/Clocker/Panel/Upcoming Events/UpcomingEventViewItem.xib index 8149e96..5a86147 100644 --- a/Clocker/Panel/Upcoming Events/UpcomingEventViewItem.xib +++ b/Clocker/Panel/Upcoming Events/UpcomingEventViewItem.xib @@ -42,7 +42,7 @@ - + diff --git a/Clocker/Panel/Upcoming Events/UpcomingEventsDataSource.swift b/Clocker/Panel/Upcoming Events/UpcomingEventsDataSource.swift index 8b71f90..127baea 100644 --- a/Clocker/Panel/Upcoming Events/UpcomingEventsDataSource.swift +++ b/Clocker/Panel/Upcoming Events/UpcomingEventsDataSource.swift @@ -44,13 +44,15 @@ class UpcomingEventsDataSource: NSObject, NSCollectionViewDataSource, NSCollecti } func collectionView(_ collectionView: NSCollectionView, layout _: NSCollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> NSSize { - if upcomingEvents.isEmpty || eventCenter.calendarAccessNotDetermined() { - return NSSize(width: collectionView.frame.width - 40, height: 50) + if eventCenter.calendarAccessNotDetermined() { + return NSSize(width: collectionView.frame.width - 40, height: collectionView.frame.height - 15) + } else if upcomingEvents.isEmpty { + return NSSize(width: collectionView.frame.width - 25, height: collectionView.frame.height - 15) + } else { + let currentEventInfo = upcomingEvents[indexPath.item] + let attributedString = NSAttributedString(string: currentEventInfo.event.title, attributes: [NSAttributedString.Key.font : avenirBookFont]) + let maxWidth = max(attributedString.size().width + 60.0, collectionView.frame.width / 2) + return NSSize(width: maxWidth, height: collectionView.frame.height - 15) } - - let currentEventInfo = upcomingEvents[indexPath.item] - let attributedString = NSAttributedString(string: currentEventInfo.event.title, attributes: [NSAttributedString.Key.font : avenirLightFont]) - let maxWidth = max(attributedString.size().width + 60.0, collectionView.frame.width / 2) - return NSSize(width: maxWidth, height: 50) } }