Browse Source

Stuff.

pull/101/head
Abhishek 3 years ago
parent
commit
34588af1e4
  1. 2
      Clocker/Clocker/ca.lproj/Localizable.strings
  2. 2
      Clocker/Clocker/de.lproj/Localizable.strings
  3. 2
      Clocker/Clocker/en.lproj/Localizable.strings
  4. 2
      Clocker/Clocker/en.lproj/Panel.xib
  5. 2
      Clocker/Clocker/es.lproj/Localizable.strings
  6. 2
      Clocker/Clocker/fr.lproj/Localizable.strings
  7. 2
      Clocker/Clocker/hi.lproj/Localizable.strings
  8. 2
      Clocker/Clocker/hr.lproj/Localizable.strings
  9. 2
      Clocker/Clocker/it.lproj/Localizable.strings
  10. 2
      Clocker/Clocker/ja.lproj/Localizable.strings
  11. 2
      Clocker/Clocker/ko.lproj/Localizable.strings
  12. 2
      Clocker/Clocker/nl.lproj/Localizable.strings
  13. 2
      Clocker/Clocker/pt-BR.lproj/Localizable.strings
  14. 2
      Clocker/Clocker/ru.lproj/Localizable.strings
  15. 2
      Clocker/Clocker/zh-Hans.lproj/Localizable.strings
  16. 2
      Clocker/Clocker/zh-Hant.lproj/Localizable.strings
  17. 6
      Clocker/Panel/Upcoming Events/ParentPanelController+UpcomingEvents.swift
  18. 4
      Clocker/Panel/Upcoming Events/UpcomingEventViewItem.swift
  19. 2
      Clocker/Panel/Upcoming Events/UpcomingEventViewItem.xib
  20. 16
      Clocker/Panel/Upcoming Events/UpcomingEventsDataSource.swift

2
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.";

2
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.";

2
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.";

2
Clocker/Clocker/en.lproj/Panel.xib

@ -261,7 +261,7 @@
</scroller>
</scrollView>
<customView wantsLayer="YES" focusRingType="none" translatesAutoresizingMaskIntoConstraints="NO" id="C7R-Dq-MFr" userLabel="Slider View">
<rect key="frame" x="0.0" y="235" width="350" height="30"/>
<rect key="frame" x="0.0" y="145" width="350" height="30"/>
<subviews>
<slider verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Vf2-uI-yf3">
<rect key="frame" x="7" y="2" width="201" height="23"/>

2
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

2
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.";

2
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.";

2
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.";

2
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.";

2
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.";

2
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.";

2
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.";

2
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.";

2
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.";

2
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.";

2
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.";

6
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 {

4
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]

2
Clocker/Panel/Upcoming Events/UpcomingEventViewItem.xib

@ -42,7 +42,7 @@
<constraint firstAttribute="height" constant="24" id="BA4-1v-xiZ"/>
</constraints>
<textFieldCell key="cell" lineBreakMode="truncatingTail" sendsActionOnEndEditing="YES" alignment="left" title="Nandita Jaiswal's 35th birthday" placeholderString="" id="Dtv-o3-gqd">
<font key="font" size="12" name="Avenir-Light"/>
<font key="font" size="12" name="Avenir-Book"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" red="1" green="0.5" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
</textFieldCell>

16
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)
}
}

Loading…
Cancel
Save