Browse Source

New SF font!

v1.2.1
Abhishek Banthia 9 years ago
parent
commit
010c95ea07
  1. 14
      Clocker.xcodeproj/project.pbxproj
  2. BIN
      Clocker.xcodeproj/project.xcworkspace/xcuserdata/abhishekbanthia.xcuserdatad/UserInterfaceState.xcuserstate
  3. 68
      Clocker/AboutUsWindow/CLAboutUsView.xib
  4. 72
      Clocker/Appearance Tab/CLAppearanceView.xib
  5. 5
      Clocker/ApplicationDelegate.m
  6. 2
      Clocker/CLOneWindow/CLOneWindow.xib
  7. 2
      Clocker/CLOneWindow/CLOneWindowController.m
  8. 2
      Clocker/Custom Slider/CLCustomSliderCell.m
  9. 5
      Clocker/Custom Table Cell Views/CLTimezoneCellView.h
  10. 14
      Clocker/Custom Table Cell Views/CLTimezoneCellView.m
  11. 20
      Clocker/Model/CLTimezoneData.h
  12. 13
      Clocker/Model/CLTimezoneData.m
  13. 38
      Clocker/Panel.xib
  14. 16
      Clocker/PanelController.m
  15. 40
      Clocker/Preferences/CLPreferencesView.xib
  16. 6
      Clocker/Preferences/CLPreferencesViewController.m

14
Clocker.xcodeproj/project.pbxproj

@ -46,6 +46,7 @@
9A9E876E1C1FEE1800A7A2DF /* Bolts.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 9A9E87571C1FED1A00A7A2DF /* Bolts.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
9A9E876F1C1FEE1A00A7A2DF /* Parse.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 9A9E87581C1FED1A00A7A2DF /* Parse.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
9AB9357B1C1AD8F7001285A0 /* CLRatingCellView.m in Sources */ = {isa = PBXBuildFile; fileRef = 9AB9357A1C1AD8F7001285A0 /* CLRatingCellView.m */; };
9ABF58721C29A80600BD0187 /* CLTimezoneData.m in Sources */ = {isa = PBXBuildFile; fileRef = 9ABF58711C29A80600BD0187 /* CLTimezoneData.m */; };
9AC678E41C1ABAB9003B4F6B /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9AC678E31C1ABAB9003B4F6B /* QuartzCore.framework */; };
9AF9A16B1C250AB300EE7C2A /* Reachability.m in Sources */ = {isa = PBXBuildFile; fileRef = 9AF9A16A1C250AB300EE7C2A /* Reachability.m */; };
DD4F7C0913C30F9F00825C6E /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DD4F7C0813C30F9F00825C6E /* Cocoa.framework */; };
@ -126,6 +127,8 @@
9A9E876B1C1FEDE700A7A2DF /* libsqlite3.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libsqlite3.tbd; path = usr/lib/libsqlite3.tbd; sourceTree = SDKROOT; };
9AB935791C1AD8F7001285A0 /* CLRatingCellView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CLRatingCellView.h; path = Clocker/CLRatingCellView.h; sourceTree = "<group>"; };
9AB9357A1C1AD8F7001285A0 /* CLRatingCellView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CLRatingCellView.m; path = Clocker/CLRatingCellView.m; sourceTree = "<group>"; };
9ABF58701C29A80600BD0187 /* CLTimezoneData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CLTimezoneData.h; path = Clocker/Model/CLTimezoneData.h; sourceTree = "<group>"; };
9ABF58711C29A80600BD0187 /* CLTimezoneData.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CLTimezoneData.m; path = Clocker/Model/CLTimezoneData.m; sourceTree = "<group>"; };
9AC678E31C1ABAB9003B4F6B /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
9AF9A1691C250AB300EE7C2A /* Reachability.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Reachability.h; path = Clocker/Reachability/Reachability.h; sourceTree = "<group>"; };
9AF9A16A1C250AB300EE7C2A /* Reachability.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = Reachability.m; path = Clocker/Reachability/Reachability.m; sourceTree = "<group>"; };
@ -281,6 +284,15 @@
name = Parse;
sourceTree = "<group>";
};
9ABF586F1C29A7EB00BD0187 /* Model */ = {
isa = PBXGroup;
children = (
9ABF58701C29A80600BD0187 /* CLTimezoneData.h */,
9ABF58711C29A80600BD0187 /* CLTimezoneData.m */,
);
name = Model;
sourceTree = "<group>";
};
9AF9A1681C250AA300EE7C2A /* Reachability */ = {
isa = PBXGroup;
children = (
@ -293,6 +305,7 @@
DD4F7BF913C30F9F00825C6E = {
isa = PBXGroup;
children = (
9ABF586F1C29A7EB00BD0187 /* Model */,
9AF9A1681C250AA300EE7C2A /* Reachability */,
9A9E875B1C1FED1E00A7A2DF /* Parse */,
9A5B1A8D1BECDFB700A77C68 /* Clocker.entitlements */,
@ -455,6 +468,7 @@
9A5951C01C1D0AA0009C17AA /* CLOneWindowController.m in Sources */,
9A8605B71BEC14BE00A810A4 /* ApplicationDelegate.m in Sources */,
9A5951F51C1D3D81009C17AA /* CLTimezoneCellView.m in Sources */,
9ABF58721C29A80600BD0187 /* CLTimezoneData.m in Sources */,
9A8605B31BEC14A600A810A4 /* ColoredButton.m in Sources */,
9A8605AE1BEC148400A810A4 /* main.m in Sources */,
9A392EE81C1CDD530072C10A /* CLAboutUsViewController.m in Sources */,

BIN
Clocker.xcodeproj/project.xcworkspace/xcuserdata/abhishekbanthia.xcuserdatad/UserInterfaceState.xcuserstate generated

Binary file not shown.

68
Clocker/AboutUsWindow/CLAboutUsView.xib

@ -24,13 +24,13 @@
<imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" image="ClockerIcon-256" id="pfa-88-uAu"/>
</imageView>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="XlC-Xd-67t">
<rect key="frame" x="153" y="187" width="97" height="35"/>
<rect key="frame" x="153" y="186" width="97" height="43"/>
<constraints>
<constraint firstAttribute="width" constant="93" id="NgB-aR-GfY"/>
<constraint firstAttribute="height" constant="35" id="dqF-vG-wml"/>
<constraint firstAttribute="height" constant="43" id="dqF-vG-wml"/>
</constraints>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Clocker" id="KPE-f2-s6r">
<font key="font" size="29" name="HelveticaNeue-Thin"/>
<font key="font" size="29" name="SFUIDisplay-Light"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
@ -42,7 +42,7 @@
<constraint firstAttribute="width" constant="75" id="W3D-bf-G5h"/>
</constraints>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Version 1.2" id="ctT-VL-V5M">
<font key="font" size="16" name="HelveticaNeue-Thin"/>
<font key="font" size="16" name="SFUIDisplay-Light"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
@ -54,19 +54,19 @@
<constraint firstAttribute="width" constant="195" id="kzy-kb-gYL"/>
</constraints>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Copyright (2015) Abhishek Banthia" id="4PX-se-5ds">
<font key="font" size="14" name="HelveticaNeue-UltraLight"/>
<font key="font" size="14" name="SFUIDisplay-Ultralight"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="6Cx-BF-XMU">
<rect key="frame" x="153" y="123" width="265" height="15"/>
<rect key="frame" x="153" y="121" width="265" height="15"/>
<constraints>
<constraint firstAttribute="height" constant="15" id="Oob-bz-4Vp"/>
<constraint firstAttribute="width" constant="261" id="RyU-Mg-Xun"/>
</constraints>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Clocker is completely open-source and is available for reuse" id="oId-kW-4fE">
<font key="font" size="10" name="HelveticaNeue-Light"/>
<font key="font" size="10" name="SFUIDisplay-Light"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
@ -79,7 +79,7 @@
</constraints>
<buttonCell key="cell" type="push" title="View Source" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="yEt-bN-Jci">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/>
<font key="font" size="13" name="SFUIDisplay-Light"/>
</buttonCell>
<connections>
<action selector="viewSource:" target="-2" id="gkr-T0-0OI"/>
@ -93,7 +93,7 @@
</constraints>
<buttonCell key="cell" type="push" title="Report Issue" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="HO1-pf-GNd">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/>
<font key="font" size="13" name="SFUIDisplay-Light"/>
</buttonCell>
<connections>
<action selector="reportIssue:" target="-2" id="71W-Nb-pYu"/>
@ -113,80 +113,52 @@
<action selector="openFacebookPage:" target="-2" id="gnQ-cM-gbO"/>
</connections>
</button>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="L56-3L-BMp">
<rect key="frame" x="153" y="93" width="265" height="15"/>
<constraints>
<constraint firstAttribute="width" constant="261" id="Few-KD-LZF"/>
<constraint firstAttribute="height" constant="15" id="QDi-xT-arg"/>
</constraints>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Timezone search is powered by GEONAMES." id="9ET-zo-WiK">
<font key="font" size="10" name="HelveticaNeue-Light"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="0Vx-Jp-YMZ">
<rect key="frame" x="153" y="78" width="265" height="15"/>
<constraints>
<constraint firstAttribute="width" constant="261" id="7xb-Sa-cCd"/>
<constraint firstAttribute="height" constant="15" id="qMb-Ob-kVe"/>
</constraints>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="City data provided by Google Geocode API." id="VMf-Px-dpm">
<font key="font" size="10" name="HelveticaNeue-Light"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="IhK-El-tOe">
<rect key="frame" x="153" y="63" width="283" height="15"/>
<rect key="frame" x="153" y="87" width="283" height="15"/>
<constraints>
<constraint firstAttribute="height" constant="15" id="7kh-Ha-LHP"/>
<constraint firstAttribute="width" constant="279" id="KbL-WX-dqu"/>
</constraints>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="You can support Clocker by starring the source on GitHub! :)" id="apa-Nu-NtC">
<font key="font" size="10" name="HelveticaNeue-Medium"/>
<font key="font" size="10" name="SFUIDisplay-Bold"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Rzs-xE-sfs">
<rect key="frame" x="153" y="108" width="265" height="15"/>
<rect key="frame" x="153" y="104" width="299" height="15"/>
<constraints>
<constraint firstAttribute="height" constant="15" id="2sg-Q1-h9h"/>
<constraint firstAttribute="width" constant="261" id="MHq-fu-8k6"/>
<constraint firstAttribute="width" constant="295" id="MHq-fu-8k6"/>
</constraints>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="under the MIT license. Inspired by Shpavoski's popup project!" id="JAy-Yp-MXm">
<font key="font" size="10" name="HelveticaNeue-Light"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="under the MIT license. Timezone search is powered by GEONAMES." id="JAy-Yp-MXm">
<font key="font" size="10" name="SFUIDisplay-Light"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
</subviews>
<constraints>
<constraint firstItem="0Vx-Jp-YMZ" firstAttribute="top" secondItem="L56-3L-BMp" secondAttribute="bottom" id="7If-0u-F8e"/>
<constraint firstItem="p2G-hA-MSX" firstAttribute="leading" secondItem="FS5-f2-b1Z" secondAttribute="leading" constant="20" id="8LW-4H-HKD"/>
<constraint firstAttribute="bottom" secondItem="q67-QZ-7g3" secondAttribute="bottom" constant="20" id="Cl5-lU-Hlw"/>
<constraint firstItem="IhK-El-tOe" firstAttribute="top" secondItem="Rzs-xE-sfs" secondAttribute="bottom" constant="2" id="GhF-Ml-o0d"/>
<constraint firstAttribute="bottom" secondItem="fgO-N3-3oh" secondAttribute="bottom" constant="20" id="Ka3-lR-aW1"/>
<constraint firstItem="Rzs-xE-sfs" firstAttribute="leading" secondItem="p2G-hA-MSX" secondAttribute="trailing" constant="10" id="Mru-Qk-R35"/>
<constraint firstItem="P3u-Um-Nby" firstAttribute="leading" secondItem="q67-QZ-7g3" secondAttribute="trailing" constant="6" id="NtI-jY-BNB"/>
<constraint firstItem="L56-3L-BMp" firstAttribute="leading" secondItem="p2G-hA-MSX" secondAttribute="trailing" constant="10" id="O8Q-EX-Phy"/>
<constraint firstItem="6Cx-BF-XMU" firstAttribute="leading" secondItem="p2G-hA-MSX" secondAttribute="trailing" constant="10" id="PxC-Pa-PfL"/>
<constraint firstItem="XlC-Xd-67t" firstAttribute="leading" secondItem="p2G-hA-MSX" secondAttribute="trailing" constant="10" id="ReB-0P-Ppj"/>
<constraint firstItem="IhK-El-tOe" firstAttribute="leading" secondItem="p2G-hA-MSX" secondAttribute="trailing" constant="10" id="YNf-3g-MSO"/>
<constraint firstItem="5Eo-aJ-L8H" firstAttribute="leading" secondItem="p2G-hA-MSX" secondAttribute="trailing" constant="10" id="a9Y-c0-NKB"/>
<constraint firstAttribute="bottom" secondItem="P3u-Um-Nby" secondAttribute="bottom" constant="20" id="csw-Zl-TRQ"/>
<constraint firstItem="IhK-El-tOe" firstAttribute="top" secondItem="0Vx-Jp-YMZ" secondAttribute="bottom" id="eSM-mI-IIG"/>
<constraint firstItem="q67-QZ-7g3" firstAttribute="leading" secondItem="fgO-N3-3oh" secondAttribute="trailing" constant="10" id="fA5-O5-kY8"/>
<constraint firstItem="L56-3L-BMp" firstAttribute="top" secondItem="Rzs-xE-sfs" secondAttribute="bottom" id="gKd-32-zpg"/>
<constraint firstItem="FG9-E5-o8y" firstAttribute="leading" secondItem="p2G-hA-MSX" secondAttribute="trailing" constant="10" id="kyh-fi-23P"/>
<constraint firstItem="0Vx-Jp-YMZ" firstAttribute="leading" secondItem="p2G-hA-MSX" secondAttribute="trailing" constant="10" id="p3M-xc-poa"/>
<constraint firstItem="5Eo-aJ-L8H" firstAttribute="top" secondItem="FG9-E5-o8y" secondAttribute="bottom" constant="2" id="pVM-TS-Wvl"/>
<constraint firstItem="XlC-Xd-67t" firstAttribute="top" secondItem="FS5-f2-b1Z" secondAttribute="top" constant="20" id="slR-Qu-uJh"/>
<constraint firstItem="XlC-Xd-67t" firstAttribute="top" secondItem="FS5-f2-b1Z" secondAttribute="top" constant="13" id="slR-Qu-uJh"/>
<constraint firstItem="p2G-hA-MSX" firstAttribute="top" secondItem="FS5-f2-b1Z" secondAttribute="top" constant="62" id="tO4-p0-Wfk"/>
<constraint firstItem="fgO-N3-3oh" firstAttribute="leading" secondItem="FS5-f2-b1Z" secondAttribute="leading" constant="155" id="wOA-HL-UjC"/>
<constraint firstItem="FG9-E5-o8y" firstAttribute="top" secondItem="XlC-Xd-67t" secondAttribute="bottom" constant="-4" id="yHu-dm-LPw"/>
<constraint firstItem="Rzs-xE-sfs" firstAttribute="top" secondItem="6Cx-BF-XMU" secondAttribute="bottom" id="ydK-a7-uQy"/>
<constraint firstItem="6Cx-BF-XMU" firstAttribute="top" secondItem="5Eo-aJ-L8H" secondAttribute="bottom" constant="8" id="zki-ag-D4H"/>
<constraint firstItem="FG9-E5-o8y" firstAttribute="top" secondItem="XlC-Xd-67t" secondAttribute="bottom" constant="-5" id="yHu-dm-LPw"/>
<constraint firstItem="Rzs-xE-sfs" firstAttribute="top" secondItem="6Cx-BF-XMU" secondAttribute="bottom" constant="2" id="ydK-a7-uQy"/>
<constraint firstItem="6Cx-BF-XMU" firstAttribute="top" secondItem="5Eo-aJ-L8H" secondAttribute="bottom" constant="10" id="zki-ag-D4H"/>
</constraints>
<point key="canvasLocation" x="601.5" y="254"/>
</view>

72
Clocker/Appearance Tab/CLAppearanceView.xib

@ -6,7 +6,6 @@
<objects>
<customObject id="-2" userLabel="File's Owner" customClass="CLAppearanceViewController">
<connections>
<outlet property="fontPopup" destination="6mg-pt-RHb" id="bOB-pV-Ehz"/>
<outlet property="theme" destination="5tI-fU-0lZ" id="dzr-Zx-E8x"/>
<outlet property="timeFormat" destination="OrL-Ix-fmY" id="ZzR-ip-HS9"/>
<outlet property="view" destination="Hz6-mo-xeY" id="0bl-1N-x8E"/>
@ -18,62 +17,29 @@
<rect key="frame" x="0.0" y="0.0" width="439" height="335"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<subviews>
<popUpButton verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="6mg-pt-RHb">
<rect key="frame" x="131" y="164" width="179" height="26"/>
<constraints>
<constraint firstAttribute="width" constant="174" id="jc9-tN-3oB"/>
</constraints>
<popUpButtonCell key="cell" type="push" bezelStyle="rounded" imagePosition="overlaps" alignment="center" lineBreakMode="truncatingTail" state="on" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" arrowPosition="noArrow" selectedItem="gEI-6s-6qO" id="2gD-cC-vIo">
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
<font key="font" size="12" name="HelveticaNeue-Thin"/>
<menu key="menu" id="Y2j-n2-KOX">
<items>
<menuItem state="on" id="gEI-6s-6qO"/>
<menuItem title="Item 2" id="kjc-LK-jcH"/>
<menuItem title="Item 3" id="9v0-Ii-eh4"/>
</items>
</menu>
</popUpButtonCell>
<connections>
<action selector="fontChanged:" target="-2" id="7lT-DL-WtM"/>
<binding destination="-2" name="content" keyPath="self.fontFamilies" id="LJn-b0-hQa"/>
<binding destination="WGI-5h-l6M" name="selectedValue" keyPath="values.defaultFontFamily" previousBinding="LJn-b0-hQa" id="U8F-ZD-GfW"/>
</connections>
</popUpButton>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Qi6-T2-p3b">
<rect key="frame" x="186" y="192" width="67" height="19"/>
<constraints>
<constraint firstAttribute="width" constant="63" id="4T0-z6-dAq"/>
</constraints>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="center" title="Font Family" id="txc-ed-fjd">
<font key="font" size="12" name="HelveticaNeue-Light"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="iVw-cq-zLz">
<rect key="frame" x="200" y="244" width="40" height="19"/>
<rect key="frame" x="200" y="246" width="40" height="18"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="Theme" id="hCb-NM-To8">
<font key="font" size="12" name="HelveticaNeue-Light"/>
<font key="font" size="12" name="SFUIDisplay-Light"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="5TC-RQ-gzI">
<rect key="frame" x="185" y="296" width="70" height="19"/>
<rect key="frame" x="186" y="297" width="68" height="18"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="Time Format" id="Hza-PB-FEf">
<font key="font" size="12" name="HelveticaNeue-Light"/>
<font key="font" size="12" name="SFUIDisplay-Light"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<segmentedControl verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="5tI-fU-0lZ">
<rect key="frame" x="158" y="217" width="124" height="24"/>
<rect key="frame" x="158" y="219" width="124" height="24"/>
<constraints>
<constraint firstAttribute="width" constant="120" id="dW5-vG-EwD"/>
</constraints>
<segmentedCell key="cell" borderStyle="border" alignment="left" style="rounded" trackingMode="selectOne" id="3ED-rf-SN8">
<font key="font" size="12" name="HelveticaNeue-Light"/>
<font key="font" size="12" name="SFUIDisplay-Light"/>
<segments>
<segment label="Default"/>
<segment label="Black" toolTip="Customize the timezone panel by selecting a theme!" selected="YES" tag="1"/>
@ -85,12 +51,12 @@
</connections>
</segmentedControl>
<segmentedControl verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Yuq-9i-SR0">
<rect key="frame" x="180" y="113" width="82" height="24"/>
<rect key="frame" x="180" y="168" width="82" height="24"/>
<constraints>
<constraint firstAttribute="width" constant="78" id="F56-RS-TkQ"/>
</constraints>
<segmentedCell key="cell" borderStyle="border" alignment="left" style="rounded" trackingMode="selectOne" id="wtp-4R-FaO">
<font key="font" size="12" name="HelveticaNeue-Light"/>
<font key="font" size="12" name="SFUIDisplay-Light"/>
<segments>
<segment label="Yes"/>
<segment label="No" toolTip="Customize the timezone panel by selecting a theme!" selected="YES" tag="1"/>
@ -102,20 +68,20 @@
</connections>
</segmentedControl>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="YQi-x8-6f8">
<rect key="frame" x="177" y="88" width="85" height="19"/>
<rect key="frame" x="178" y="144" width="84" height="18"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="Display Options" id="KTv-74-itf">
<font key="font" size="12" name="HelveticaNeue-Light"/>
<font key="font" size="12" name="SFUIDisplay-Light"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<segmentedControl verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="1eh-BT-2fK">
<rect key="frame" x="101" y="61" width="240" height="24"/>
<rect key="frame" x="101" y="117" width="240" height="24"/>
<constraints>
<constraint firstAttribute="width" constant="236" id="uU1-9Q-cqa"/>
</constraints>
<segmentedCell key="cell" borderStyle="border" alignment="left" style="rounded" trackingMode="selectOne" id="ZV9-ih-faz">
<font key="font" size="12" name="HelveticaNeue-Light"/>
<font key="font" size="12" name="SFUIDisplay-Light"/>
<segments>
<segment label="Show Relative Dates"/>
<segment label="Show actual day" toolTip="Customize the timezone panel by selecting a theme!" selected="YES" tag="1"/>
@ -127,12 +93,12 @@
</connections>
</segmentedControl>
<segmentedControl verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="OrL-Ix-fmY">
<rect key="frame" x="102" y="269" width="236" height="24"/>
<rect key="frame" x="102" y="270" width="236" height="24"/>
<constraints>
<constraint firstAttribute="width" constant="232" id="uOJ-Mi-Fin"/>
</constraints>
<segmentedCell key="cell" borderStyle="border" alignment="left" style="rounded" trackingMode="selectOne" id="s7b-og-KCV">
<font key="font" size="13" name="HelveticaNeue-Light"/>
<font key="font" size="13" name="SFUIDisplay-Light"/>
<segments>
<segment label="12-hour clock" width="115"/>
<segment label="24-hour clock" toolTip="Set the time format you want to see in the timezone panel!" width="114" tag="1"/>
@ -144,9 +110,9 @@
</connections>
</segmentedControl>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="o8j-B8-IEv">
<rect key="frame" x="146" y="140" width="147" height="19"/>
<rect key="frame" x="149" y="195" width="142" height="18"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="Show Sunrise, Sunset Time" id="gv1-YC-fw7">
<font key="font" size="12" name="HelveticaNeue-Light"/>
<font key="font" size="12" name="SFUIDisplay-Light"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
@ -157,20 +123,16 @@
<constraint firstItem="YQi-x8-6f8" firstAttribute="centerX" secondItem="Hz6-mo-xeY" secondAttribute="centerX" id="6LU-d8-lKX"/>
<constraint firstItem="Yuq-9i-SR0" firstAttribute="top" secondItem="o8j-B8-IEv" secondAttribute="bottom" constant="4" id="B4y-AK-Eod"/>
<constraint firstItem="OrL-Ix-fmY" firstAttribute="centerX" secondItem="Hz6-mo-xeY" secondAttribute="centerX" id="JtZ-ra-RaC"/>
<constraint firstItem="6mg-pt-RHb" firstAttribute="centerX" secondItem="Hz6-mo-xeY" secondAttribute="centerX" id="Oh4-4K-mPE"/>
<constraint firstItem="6mg-pt-RHb" firstAttribute="top" secondItem="Qi6-T2-p3b" secondAttribute="bottom" constant="4" id="P8v-4d-79D"/>
<constraint firstItem="o8j-B8-IEv" firstAttribute="top" secondItem="6mg-pt-RHb" secondAttribute="bottom" constant="8" id="PGn-UJ-nsm"/>
<constraint firstItem="1eh-BT-2fK" firstAttribute="top" secondItem="YQi-x8-6f8" secondAttribute="bottom" constant="4" id="POa-Gi-Prk"/>
<constraint firstItem="Yuq-9i-SR0" firstAttribute="centerX" secondItem="Hz6-mo-xeY" secondAttribute="centerX" constant="1.5" id="Tc9-yI-eIf"/>
<constraint firstItem="5tI-fU-0lZ" firstAttribute="centerX" secondItem="Hz6-mo-xeY" secondAttribute="centerX" id="Vkb-QV-unN"/>
<constraint firstItem="iVw-cq-zLz" firstAttribute="top" secondItem="OrL-Ix-fmY" secondAttribute="bottom" constant="8" id="XgM-Wl-Xap"/>
<constraint firstItem="Qi6-T2-p3b" firstAttribute="centerX" secondItem="Hz6-mo-xeY" secondAttribute="centerX" id="ZKu-5n-Qwo"/>
<constraint firstItem="iVw-cq-zLz" firstAttribute="centerX" secondItem="Hz6-mo-xeY" secondAttribute="centerX" id="Zh8-Vn-VxM"/>
<constraint firstItem="o8j-B8-IEv" firstAttribute="top" secondItem="5tI-fU-0lZ" secondAttribute="bottom" constant="8" id="bPs-wP-sL7"/>
<constraint firstItem="5tI-fU-0lZ" firstAttribute="top" secondItem="iVw-cq-zLz" secondAttribute="bottom" constant="4" id="bo6-s2-Vfj"/>
<constraint firstItem="1eh-BT-2fK" firstAttribute="centerX" secondItem="Hz6-mo-xeY" secondAttribute="centerX" constant="1.5" id="fvI-By-5Ef"/>
<constraint firstItem="5TC-RQ-gzI" firstAttribute="centerX" secondItem="Hz6-mo-xeY" secondAttribute="centerX" id="lc0-ud-Mnw"/>
<constraint firstItem="5TC-RQ-gzI" firstAttribute="top" secondItem="Hz6-mo-xeY" secondAttribute="top" constant="20" id="oI8-4L-ppf"/>
<constraint firstItem="Qi6-T2-p3b" firstAttribute="top" secondItem="5tI-fU-0lZ" secondAttribute="bottom" constant="8" id="rAe-QL-e4G"/>
<constraint firstItem="OrL-Ix-fmY" firstAttribute="top" secondItem="5TC-RQ-gzI" secondAttribute="bottom" constant="4" id="rpk-WN-DT9"/>
<constraint firstItem="YQi-x8-6f8" firstAttribute="top" secondItem="Yuq-9i-SR0" secondAttribute="bottom" constant="8" id="vQl-up-u15"/>
</constraints>

5
Clocker/ApplicationDelegate.m

@ -91,11 +91,6 @@ void *kContextActivePanel = &kContextActivePanel;
[[NSUserDefaults standardUserDefaults] setObject:newDefaults forKey:CLDefaultPreferenceKey];
}
NSString *defaultFont = [[NSUserDefaults standardUserDefaults] objectForKey:@"defaultFontFamily"];
if (defaultFont == nil) {
[[NSUserDefaults standardUserDefaults] setObject:@"Default" forKey:@"defaultFontFamily"];
}
NSString *defaultTheme = [[NSUserDefaults standardUserDefaults] objectForKey:@"defaultTheme"];
if (defaultTheme == nil) {
[[NSUserDefaults standardUserDefaults] setObject:@"Default" forKey:@"defaultTheme"];

2
Clocker/CLOneWindow/CLOneWindow.xib

@ -12,7 +12,7 @@
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
<window title="Window" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" oneShot="NO" releasedWhenClosed="NO" animationBehavior="default" id="F0z-JX-Cv5">
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES"/>
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" texturedBackground="YES"/>
<rect key="contentRect" x="196" y="240" width="480" height="275"/>
<rect key="screenRect" x="0.0" y="0.0" width="1280" height="777"/>
<view key="contentView" id="se5-gp-TjO">

2
Clocker/CLOneWindow/CLOneWindowController.m

@ -24,6 +24,8 @@ static CLOneWindowController *sharedWindow = nil;
self.window.titleVisibility = NSWindowTitleHidden;
self.window.backgroundColor = [NSColor whiteColor];
[self openPreferences:nil];
// Implement this method to handle any initialization after your window controller's window has been loaded from its nib file.

2
Clocker/Custom Slider/CLCustomSliderCell.m

@ -35,7 +35,7 @@
// Draw Right Part
NSBezierPath* active = [NSBezierPath bezierPathWithRoundedRect: leftRect xRadius: barRadius yRadius: barRadius];
[[NSColor colorWithCalibratedRed:67.0/255.0 green:138.0/255.0 blue:250.0/255.0 alpha:1.0] setFill];
[theme isEqualToString:@"Black"] ? [[NSColor colorWithCalibratedRed:67.0/255.0 green:138.0/255.0 blue:250.0/255.0 alpha:1.0] setFill] : [NSColor.blackColor setFill];
[theme isEqualToString:@"Black"] ? [[NSColor colorWithCalibratedRed:67.0/255.0 green:138.0/255.0 blue:250.0/255.0 alpha:1.0] setFill] : [NSColor.grayColor setFill];
[active fill];
}

5
Clocker/Custom Table Cell Views/CLTimezoneCellView.h

@ -13,9 +13,10 @@
@property (weak) IBOutlet NSTextField *customName;
@property (weak) IBOutlet NSTextField *relativeDate;
@property (weak) IBOutlet NSTextField *time;
@property (weak) IBOutlet NSTextField *sunTime;
@property (nonatomic) NSInteger rowNumber;
- (void)updateFontFamilyWithFontName:(NSString *)fontName andCell:(CLTimezoneCellView*)cell;
- (void)updateTextColorWithColor:(NSColor *)color andCell:(CLTimezoneCellView*)cell;
- (void)setDefaultThemeForCell:(CLTimezoneCellView *)cell;
@end

14
Clocker/Custom Table Cell Views/CLTimezoneCellView.m

@ -45,13 +45,6 @@
}
}
- (void)updateFontFamilyWithFontName:(NSString *)fontName andCell:(CLTimezoneCellView*)cell
{
cell.relativeDate.font = [NSFont fontWithName:fontName size:13];
cell.customName.font = [NSFont fontWithName:fontName size:15];
cell.time.font = [NSFont fontWithName:fontName size:29];
}
- (void)updateTextColorWithColor:(NSColor *)color andCell:(CLTimezoneCellView*)cell
{
cell.relativeDate.textColor = color;
@ -59,11 +52,4 @@
cell.time.textColor = color;
}
- (void)setDefaultThemeForCell:(CLTimezoneCellView *)cell
{
cell.relativeDate.font = [NSFont fontWithName:@"Helvetica-Bold" size:13];
cell.customName.font = [NSFont fontWithName:@"Helvetica-Light" size:15];
cell.time.font = [NSFont fontWithName:@"Helvetica-Light" size:29];
}
@end

20
Clocker/Model/CLTimezoneData.h

@ -0,0 +1,20 @@
//
// CLTimezoneData.h
// Clocker
//
// Created by Abhishek Banthia on 12/22/15.
//
//
#import <Foundation/Foundation.h>
@interface CLTimezoneData : NSObject
@property (strong, nonatomic) NSString *customLabel;
@property (strong, nonatomic) NSString *formattedAddress;
@property (strong, nonatomic) NSString *place_id;
@property (strong, nonatomic) NSString *sunriseTime;
@property (strong, nonatomic) NSString *sunsetTime;
@property (strong, nonatomic) NSString *timezoneID;
@end

13
Clocker/Model/CLTimezoneData.m

@ -0,0 +1,13 @@
//
// CLTimezoneData.m
// Clocker
//
// Created by Abhishek Banthia on 12/22/15.
//
//
#import "CLTimezoneData.h"
@implementation CLTimezoneData
@end

38
Clocker/Panel.xib

@ -59,13 +59,13 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" tag="100" translatesAutoresizingMaskIntoConstraints="NO" id="etF-33-bCB">
<rect key="frame" x="7" y="29" width="134" height="23"/>
<rect key="frame" x="7" y="32" width="134" height="20"/>
<constraints>
<constraint firstAttribute="width" constant="130" id="32b-h6-joo"/>
<constraint firstAttribute="height" constant="23" id="vod-YN-iNX"/>
<constraint firstAttribute="height" constant="20" id="vod-YN-iNX"/>
</constraints>
<textFieldCell key="cell" lineBreakMode="truncatingTail" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" placeholderString="Timezone Name" id="rnh-AP-ooc">
<font key="font" size="15" name="Helvetica-Light"/>
<font key="font" size="15" name="SFUIDisplay-Thin"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
@ -74,13 +74,13 @@
</connections>
</textField>
<textField verticalHuggingPriority="750" tag="102" translatesAutoresizingMaskIntoConstraints="NO" id="QUd-7D-q14">
<rect key="frame" x="8" y="12" width="104" height="22"/>
<rect key="frame" x="8" y="12" width="76" height="18"/>
<constraints>
<constraint firstAttribute="height" constant="22" id="42Y-hy-Uo7"/>
<constraint firstAttribute="width" constant="100" id="fkH-oq-qvM"/>
<constraint firstAttribute="height" constant="18" id="42Y-hy-Uo7"/>
<constraint firstAttribute="width" constant="72" id="fkH-oq-qvM"/>
</constraints>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" state="on" placeholderString="Date" id="74U-rv-5xj">
<font key="font" size="13" name="Helvetica-Bold"/>
<textFieldCell key="cell" sendsActionOnEndEditing="YES" state="on" placeholderString="Tomorrow" usesSingleLineMode="YES" id="74U-rv-5xj">
<font key="font" size="13" name="SFUIDisplay-Bold"/>
<color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
@ -92,7 +92,7 @@
<constraint firstAttribute="width" constant="130" id="cQV-gJ-zMz"/>
</constraints>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" placeholderString="23:46 AM" id="g8s-EU-UHx">
<font key="font" size="27" name="Helvetica-Light"/>
<font key="font" size="27" name="SFUIDisplay-Thin"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
@ -102,7 +102,7 @@
<constraint firstItem="QUd-7D-q14" firstAttribute="leading" secondItem="qbN-ba-fho" secondAttribute="leading" constant="10" id="0Qz-Ev-efP"/>
<constraint firstItem="etF-33-bCB" firstAttribute="top" secondItem="qbN-ba-fho" secondAttribute="top" constant="8" id="Lct-kG-usb"/>
<constraint firstItem="vnv-J2-7r1" firstAttribute="centerY" secondItem="qbN-ba-fho" secondAttribute="centerY" constant="-2" id="TuQ-gE-ZUh"/>
<constraint firstItem="QUd-7D-q14" firstAttribute="top" secondItem="etF-33-bCB" secondAttribute="bottom" constant="-5" id="VO6-Zn-eA3"/>
<constraint firstItem="QUd-7D-q14" firstAttribute="top" secondItem="etF-33-bCB" secondAttribute="bottom" constant="2" id="VO6-Zn-eA3"/>
<constraint firstItem="etF-33-bCB" firstAttribute="leading" secondItem="qbN-ba-fho" secondAttribute="leading" constant="9" id="ueW-ow-ZRq"/>
<constraint firstAttribute="trailing" secondItem="vnv-J2-7r1" secondAttribute="trailing" constant="8" id="zXo-eA-0bQ"/>
</constraints>
@ -118,16 +118,16 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="gRN-xJ-bfq">
<rect key="frame" x="61" y="30" width="16" height="16"/>
<rect key="frame" x="62" y="30" width="16" height="16"/>
<imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" image="ClockerIcon-16" id="8gl-Vi-0VF"/>
</imageView>
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" allowsExpansionToolTips="YES" translatesAutoresizingMaskIntoConstraints="NO" id="JNw-ld-oz9">
<rect key="frame" x="82" y="28" width="115" height="20"/>
<rect key="frame" x="83" y="28" width="114" height="20"/>
<constraints>
<constraint firstAttribute="height" constant="20" id="kOH-Lb-7sB"/>
</constraints>
<textFieldCell key="cell" lineBreakMode="truncatingTail" sendsActionOnEndEditing="YES" title="Enjoy Using Clocker?" id="iM2-CB-CE2">
<font key="font" size="12" name="HelveticaNeue-Light"/>
<font key="font" size="12" name="SFUIDisplay-Regular"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
@ -140,7 +140,7 @@
</constraints>
<buttonCell key="cell" type="push" title="Not Really" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="Ckn-uK-FWI">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/>
<font key="font" size="13" name="SFUIDisplay-Thin"/>
</buttonCell>
<connections>
<action selector="actionOnNegativeFeedback:" target="wWn-9q-AYl" id="lBL-WL-xum"/>
@ -150,7 +150,7 @@
<rect key="frame" x="130" y="-2" width="108" height="32"/>
<buttonCell key="cell" type="push" title="Yes!" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="5K0-zD-kN0">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/>
<font key="font" size="13" name="SFUIDisplay-Thin"/>
</buttonCell>
<connections>
<action selector="actionOnPositiveFeedback:" target="wWn-9q-AYl" id="KYm-dp-Jno"/>
@ -201,13 +201,13 @@
</scroller>
</scrollView>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="rGL-w7-iSa">
<rect key="frame" x="100" y="26" width="79" height="20"/>
<rect key="frame" x="100" y="28" width="79" height="15"/>
<constraints>
<constraint firstAttribute="width" constant="75" id="XLu-0I-ACL"/>
<constraint firstAttribute="height" constant="20" id="j4s-Vf-pQQ"/>
<constraint firstAttribute="height" constant="15" id="j4s-Vf-pQQ"/>
</constraints>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="center" placeholderString="Future Slider" id="KPS-ge-xQM">
<font key="font" size="13" name="HelveticaNeue-Light"/>
<font key="font" size="13" name="SFUIDisplay-Thin"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
@ -259,7 +259,7 @@
<constraint firstAttribute="bottom" secondItem="nTt-pf-Hw2" secondAttribute="bottom" constant="2" id="QoV-TI-KVJ"/>
<constraint firstAttribute="bottom" secondItem="OFy-u1-TnH" secondAttribute="bottom" constant="2" id="Ubf-Mv-WMp"/>
<constraint firstAttribute="trailing" secondItem="4Gd-Nv-fXr" secondAttribute="trailing" constant="-1" id="XP6-W0-2XT"/>
<constraint firstItem="T7e-RS-eTE" firstAttribute="top" secondItem="rGL-w7-iSa" secondAttribute="bottom" constant="1" id="cuU-JZ-uRn"/>
<constraint firstItem="T7e-RS-eTE" firstAttribute="top" secondItem="rGL-w7-iSa" secondAttribute="bottom" constant="3" id="cuU-JZ-uRn"/>
<constraint firstItem="4Gd-Nv-fXr" firstAttribute="leading" secondItem="6" secondAttribute="leading" constant="-1" id="fHc-VQ-mJ3"/>
<constraint firstItem="rGL-w7-iSa" firstAttribute="centerX" secondItem="dFw-ts-8OZ" secondAttribute="centerX" id="jY7-tr-VZ1"/>
<constraint firstAttribute="trailing" secondItem="OFy-u1-TnH" secondAttribute="trailing" constant="5" id="p2a-qj-LHE"/>

16
Clocker/PanelController.m

@ -302,14 +302,6 @@ NSString *const CLTimezoneCellViewIdentifier = @"timeZoneCell";
CLTimezoneCellView *cell = [tableView makeViewWithIdentifier:CLTimezoneCellViewIdentifier owner:self];
NSString *fontFamily = [[NSUserDefaults standardUserDefaults] objectForKey:@"defaultFontFamily"];
if (fontFamily.length > 0 && ![fontFamily isEqualToString:@"Default"])
{
[cell updateFontFamilyWithFontName:fontFamily andCell:cell];
}
fontFamily.length > 0 && ![fontFamily isEqualToString:@"Default"] ? [cell updateFontFamilyWithFontName:fontFamily andCell:cell] : [cell setDefaultThemeForCell:cell];
NSString *theme = [[NSUserDefaults standardUserDefaults] objectForKey:@"defaultTheme"];
if (theme.length > 0 && ![theme isEqualToString:@"Default"])
{
@ -332,6 +324,8 @@ NSString *const CLTimezoneCellViewIdentifier = @"timeZoneCell";
cell.time.stringValue = [self getTimeForTimeZone:self.defaultPreferences[row][CLTimezoneID]];
cell.rowNumber = row;
cell.sunTime.stringValue = [self getFormattedSunriseOrSunsetTime:self.defaultPreferences[row]];
cell.customName.stringValue = [self formatStringShouldContainCity:YES
withTimezoneName:self.defaultPreferences[row]];
@ -374,6 +368,11 @@ NSString *const CLTimezoneCellViewIdentifier = @"timeZoneCell";
}
- (NSString *)getFormattedSunriseOrSunsetTime:(NSDictionary *)originalTime
{
return [originalTime[@"sunriseTime"] substringFromIndex:11];
}
- (NSString *)getTimeForTimeZone:(NSString *)timezoneID
{
NSCalendar *currentCalendar = [NSCalendar autoupdatingCurrentCalendar];
@ -549,6 +548,7 @@ NSString *const CLTimezoneCellViewIdentifier = @"timeZoneCell";
self.shutdownButton.hidden = !value;
self.preferencesButton.hidden = !value;
self.sliderLabel.hidden = !value;
}
- (IBAction)sliderMoved:(id)sender

40
Clocker/Preferences/CLPreferencesView.xib

@ -68,7 +68,7 @@ CA
<color key="backgroundColor" name="headerColor" catalog="System" colorSpace="catalog"/>
</tableHeaderCell>
<textFieldCell key="dataCell" lineBreakMode="truncatingTail" selectable="YES" editable="YES" title="Text Cell" id="HJL-uw-ZOC">
<font key="font" size="13" name="HelveticaNeue-Light"/>
<font key="font" size="13" name="SFUIDisplay-Light"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
@ -81,7 +81,7 @@ CA
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</tableHeaderCell>
<textFieldCell key="dataCell" lineBreakMode="truncatingTail" selectable="YES" editable="YES" alignment="left" title="Text Cell" id="xOd-3p-ihC">
<font key="font" size="13" name="HelveticaNeue-Light"/>
<font key="font" size="13" name="SFUIDisplay-Light"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
@ -137,7 +137,7 @@ CA
<autoresizingMask key="autoresizingMask"/>
<subviews>
<scrollView focusRingType="none" borderType="none" autohidesScrollers="YES" horizontalLineScroll="22" horizontalPageScroll="10" verticalLineScroll="22" verticalPageScroll="10" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="LM9-75-vkc">
<rect key="frame" x="8" y="27" width="329" height="257"/>
<rect key="frame" x="8" y="28" width="329" height="257"/>
<clipView key="contentView" id="Z7L-Ef-90Z">
<rect key="frame" x="0.0" y="0.0" width="329" height="257"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
@ -157,7 +157,7 @@ CA
<color key="backgroundColor" name="headerColor" catalog="System" colorSpace="catalog"/>
</tableHeaderCell>
<textFieldCell key="dataCell" lineBreakMode="truncatingTail" selectable="YES" editable="YES" title="Text Cell" id="QRU-bQ-qf9">
<font key="font" size="13" name="HelveticaNeue-Light"/>
<font key="font" size="13" name="SFUIDisplay-Light"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
@ -199,9 +199,9 @@ CA
</tableHeaderView>
</scrollView>
<searchField toolTip="Search a timezone" wantsLayer="YES" focusRingType="none" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="biT-6m-ElR">
<rect key="frame" x="8" y="287" width="329" height="25"/>
<rect key="frame" x="8" y="288" width="329" height="24"/>
<searchFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" borderStyle="bezel" focusRingType="none" placeholderString="Enter a city, state, country name" drawsBackground="YES" usesSingleLineMode="YES" id="ijc-z6-99E">
<font key="font" size="13" name="HelveticaNeue-Light"/>
<font key="font" size="13" name="SFUIDisplay-Light"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</searchFieldCell>
@ -215,30 +215,30 @@ CA
</connections>
</searchField>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="KFC-NV-5A3">
<rect key="frame" x="102" y="7" width="230" height="20"/>
<rect key="frame" x="102" y="9" width="230" height="15"/>
<constraints>
<constraint firstAttribute="height" constant="20" id="rr3-gU-VUn"/>
<constraint firstAttribute="height" constant="15" id="rr3-gU-VUn"/>
</constraints>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Label" id="COF-wH-VLX">
<font key="font" size="13" name="HelveticaNeue-Light"/>
<font key="font" size="13" name="SFUIDisplay-Light"/>
<color key="textColor" red="1" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Wb6-yr-Pw4">
<rect key="frame" x="98" y="134" width="259" height="20"/>
<rect key="frame" x="98" y="135" width="259" height="20"/>
<constraints>
<constraint firstAttribute="height" constant="20" id="QQQ-at-c1H"/>
<constraint firstAttribute="width" constant="255" id="ezl-af-c93"/>
</constraints>
<textFieldCell key="cell" lineBreakMode="truncatingTail" sendsActionOnEndEditing="YES" alignment="left" placeholderString="Please enter a timezone name" id="l4k-Vi-z4I">
<font key="font" size="13" name="HelveticaNeue-Light"/>
<font key="font" size="13" name="SFUIDisplay-Light"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<progressIndicator wantsLayer="YES" horizontalHuggingPriority="750" verticalHuggingPriority="750" maxValue="100" bezeled="NO" indeterminate="YES" controlSize="small" style="spinning" translatesAutoresizingMaskIntoConstraints="NO" id="ifx-PO-gfq">
<rect key="frame" x="75" y="134" width="16" height="16"/>
<rect key="frame" x="75" y="137" width="16" height="16"/>
<connections>
<binding destination="-2" name="hidden" keyPath="self.activityInProgress" id="9pA-XX-dhd">
<dictionary key="options">
@ -249,28 +249,28 @@ CA
</connections>
</progressIndicator>
<button toolTip="Add a timezone" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="cyZ-cL-S7a">
<rect key="frame" x="50" y="4" width="50" height="22"/>
<rect key="frame" x="50" y="4" width="50" height="19"/>
<constraints>
<constraint firstAttribute="height" constant="21" id="lku-Qx-nX5"/>
<constraint firstAttribute="height" constant="18" id="lku-Qx-nX5"/>
<constraint firstAttribute="width" constant="50" id="vqo-37-082"/>
</constraints>
<buttonCell key="cell" type="roundRect" title="Close" bezelStyle="roundedRect" imagePosition="left" alignment="center" borderStyle="border" inset="2" id="YjP-c4-vTl">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="cellTitle"/>
<font key="font" size="12" name="SFUIDisplay-Light"/>
</buttonCell>
<connections>
<action selector="closePanel:" target="-2" id="YRs-VA-eFr"/>
</connections>
</button>
<button toolTip="Add a timezone" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="hp6-CH-WJs">
<rect key="frame" x="8" y="4" width="40" height="22"/>
<rect key="frame" x="8" y="4" width="40" height="19"/>
<constraints>
<constraint firstAttribute="height" constant="21" id="r2L-5O-GZy"/>
<constraint firstAttribute="height" constant="18" id="r2L-5O-GZy"/>
<constraint firstAttribute="width" constant="40" id="yuH-LM-RAy"/>
</constraints>
<buttonCell key="cell" type="roundRect" title="Add" bezelStyle="roundedRect" imagePosition="left" alignment="center" borderStyle="border" inset="2" id="x6l-8x-qnu">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="cellTitle"/>
<font key="font" size="12" name="SFUIDisplay-Light"/>
</buttonCell>
<connections>
<action selector="addToFavorites:" target="-2" id="Mdg-7P-kDy"/>
@ -288,7 +288,7 @@ CA
<constraint firstItem="Wb6-yr-Pw4" firstAttribute="leading" secondItem="ifx-PO-gfq" secondAttribute="trailing" constant="9" id="9cg-iz-7Dq"/>
<constraint firstAttribute="trailing" secondItem="KFC-NV-5A3" secondAttribute="trailing" constant="15" id="B6V-vn-THO"/>
<constraint firstItem="LM9-75-vkc" firstAttribute="top" secondItem="biT-6m-ElR" secondAttribute="bottom" constant="3" id="DZR-XO-6sm"/>
<constraint firstAttribute="bottom" secondItem="KFC-NV-5A3" secondAttribute="bottom" constant="7" id="FWx-F1-VK8"/>
<constraint firstAttribute="bottom" secondItem="KFC-NV-5A3" secondAttribute="bottom" constant="9" id="FWx-F1-VK8"/>
<constraint firstItem="hp6-CH-WJs" firstAttribute="leading" secondItem="kXo-nl-oxR" secondAttribute="leading" constant="8" id="Oir-hL-Og8"/>
<constraint firstAttribute="bottom" secondItem="cyZ-cL-S7a" secondAttribute="bottom" constant="5" id="QQ1-JS-knf"/>
<constraint firstItem="biT-6m-ElR" firstAttribute="top" secondItem="kXo-nl-oxR" secondAttribute="top" constant="8" id="Y7N-oR-3KY"/>
@ -297,7 +297,7 @@ CA
<constraint firstAttribute="bottom" secondItem="hp6-CH-WJs" secondAttribute="bottom" constant="5" id="hEn-h1-my5"/>
<constraint firstItem="biT-6m-ElR" firstAttribute="leading" secondItem="kXo-nl-oxR" secondAttribute="leading" constant="8" id="nhU-xR-AW2"/>
<constraint firstAttribute="trailing" secondItem="LM9-75-vkc" secondAttribute="trailing" constant="8" id="pMs-Ol-hsh"/>
<constraint firstItem="ifx-PO-gfq" firstAttribute="centerY" secondItem="Q0t-hQ-orw" secondAttribute="centerY" constant="2" id="roB-zz-kJF"/>
<constraint firstItem="ifx-PO-gfq" firstAttribute="centerY" secondItem="Q0t-hQ-orw" secondAttribute="centerY" id="roB-zz-kJF"/>
<constraint firstItem="Wb6-yr-Pw4" firstAttribute="centerY" secondItem="Q0t-hQ-orw" secondAttribute="centerY" id="uio-eQ-cpc"/>
<constraint firstItem="Wb6-yr-Pw4" firstAttribute="centerX" secondItem="Q0t-hQ-orw" secondAttribute="centerX" constant="55" id="y8D-5A-bLz"/>
</constraints>

6
Clocker/Preferences/CLPreferencesViewController.m

@ -65,8 +65,6 @@ NSString *const CLPreferencesAvailableTimezoneIdentifier = @"availableTimezones"
//Register for drag and drop
[self.timezoneTableView registerForDraggedTypes: [NSArray arrayWithObject: CLDragSessionKey]];
NSMutableArray *availableFonts = [[NSMutableArray alloc] init];
// Do view setup here.
}
@ -265,7 +263,7 @@ NSString *const CLPreferencesAvailableTimezoneIdentifier = @"availableTimezones"
if (self.dataTask.state == NSURLSessionTaskStateRunning) {
[self.dataTask cancel];
}
self.activityInProgress = NO;
self.placeholderLabel.placeholderString = CLEmptyString;
}
@ -496,7 +494,7 @@ NSString *const CLPreferencesAvailableTimezoneIdentifier = @"availableTimezones"
error:nil];
if (json.count == 0) {
self.placeholderLabel.placeholderString = @"No results found";
self.placeholderLabel.placeholderString = @"No results found! ! 😔 Try Again?";
return;
}

Loading…
Cancel
Save