Skip to content

Commit

Permalink
New Icons and Screenshots!
Browse files Browse the repository at this point in the history
  • Loading branch information
n0shake committed Jan 1, 2016
1 parent 9ffd107 commit 72f7486
Show file tree
Hide file tree
Showing 47 changed files with 66 additions and 49 deletions.
Binary file removed Clocker-Preview.gif
Binary file not shown.
Binary file not shown.
32 changes: 16 additions & 16 deletions Clocker/AboutUsWindow/CLAboutUsView.xib
Expand Up @@ -13,19 +13,19 @@
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
<view id="FS5-f2-b1Z">
<rect key="frame" x="0.0" y="0.0" width="487" height="242"/>
<rect key="frame" x="0.0" y="0.0" width="487" height="222"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="p2G-hA-MSX">
<rect key="frame" x="20" y="63" width="125" height="117"/>
<rect key="frame" x="20" y="85" width="125" height="117"/>
<constraints>
<constraint firstAttribute="width" constant="125" id="6Kp-RK-dT4"/>
<constraint firstAttribute="height" constant="117" id="znw-VN-bXv"/>
</constraints>
<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="186" width="97" height="43"/>
<rect key="frame" x="153" y="166" width="97" height="43"/>
<constraints>
<constraint firstAttribute="width" constant="93" id="NgB-aR-GfY"/>
<constraint firstAttribute="height" constant="43" id="dqF-vG-wml"/>
Expand All @@ -37,7 +37,7 @@
</textFieldCell>
</textField>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="FG9-E5-o8y">
<rect key="frame" x="153" y="168" width="316" height="23"/>
<rect key="frame" x="153" y="148" width="316" height="23"/>
<constraints>
<constraint firstAttribute="height" constant="23" id="APM-BF-sIg"/>
</constraints>
Expand All @@ -48,7 +48,7 @@
</textFieldCell>
</textField>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="5Eo-aJ-L8H">
<rect key="frame" x="153" y="146" width="199" height="20"/>
<rect key="frame" x="153" y="126" width="199" height="20"/>
<constraints>
<constraint firstAttribute="height" constant="20" id="6fy-MI-uin"/>
<constraint firstAttribute="width" constant="195" id="kzy-kb-gYL"/>
Expand All @@ -60,7 +60,7 @@
</textFieldCell>
</textField>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="6Cx-BF-XMU">
<rect key="frame" x="153" y="121" width="265" height="15"/>
<rect key="frame" x="153" y="101" width="265" height="15"/>
<constraints>
<constraint firstAttribute="height" constant="15" id="Oob-bz-4Vp"/>
<constraint firstAttribute="width" constant="261" id="RyU-Mg-Xun"/>
Expand All @@ -72,12 +72,12 @@
</textFieldCell>
</textField>
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="fgO-N3-3oh">
<rect key="frame" x="149" y="13" width="102" height="32"/>
<rect key="frame" x="124" y="13" width="130" height="32"/>
<constraints>
<constraint firstAttribute="height" constant="21" id="HOR-7s-O7V"/>
<constraint firstAttribute="width" constant="90" id="fjr-FG-Jlq"/>
<constraint firstAttribute="width" constant="118" id="fjr-FG-Jlq"/>
</constraints>
<buttonCell key="cell" type="push" title="View Source" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="yEt-bN-Jci">
<buttonCell key="cell" type="push" title="Support Clocker" 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" size="13" name="SFUIDisplay-Light"/>
</buttonCell>
Expand All @@ -86,7 +86,7 @@
</connections>
</button>
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="q67-QZ-7g3">
<rect key="frame" x="247" y="13" width="107" height="32"/>
<rect key="frame" x="250" y="13" width="107" height="32"/>
<constraints>
<constraint firstAttribute="height" constant="21" id="Fw5-r2-JCs"/>
<constraint firstAttribute="width" constant="95" id="zmg-WE-hsM"/>
Expand All @@ -100,7 +100,7 @@
</connections>
</button>
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="P3u-Um-Nby">
<rect key="frame" x="350" y="13" width="123" height="32"/>
<rect key="frame" x="353" y="13" width="123" height="32"/>
<constraints>
<constraint firstAttribute="width" constant="111" id="5Yt-bH-NGf"/>
<constraint firstAttribute="height" constant="21" id="8Jh-fm-8up"/>
Expand All @@ -114,7 +114,7 @@
</connections>
</button>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="IhK-El-tOe">
<rect key="frame" x="153" y="87" width="283" height="15"/>
<rect key="frame" x="153" y="67" width="283" height="15"/>
<constraints>
<constraint firstAttribute="height" constant="15" id="7kh-Ha-LHP"/>
<constraint firstAttribute="width" constant="279" id="KbL-WX-dqu"/>
Expand All @@ -126,7 +126,7 @@
</textFieldCell>
</textField>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Rzs-xE-sfs">
<rect key="frame" x="153" y="104" width="299" height="15"/>
<rect key="frame" x="153" y="84" width="299" height="15"/>
<constraints>
<constraint firstAttribute="height" constant="15" id="2sg-Q1-h9h"/>
<constraint firstAttribute="width" constant="295" id="MHq-fu-8k6"/>
Expand Down Expand Up @@ -155,13 +155,13 @@
<constraint firstItem="FG9-E5-o8y" firstAttribute="leading" secondItem="p2G-hA-MSX" secondAttribute="trailing" constant="10" id="kyh-fi-23P"/>
<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="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="p2G-hA-MSX" firstAttribute="top" secondItem="FS5-f2-b1Z" secondAttribute="top" constant="20" id="tO4-p0-Wfk"/>
<constraint firstItem="fgO-N3-3oh" firstAttribute="leading" secondItem="FS5-f2-b1Z" secondAttribute="leading" constant="130" id="wOA-HL-UjC"/>
<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"/>
<point key="canvasLocation" x="601.5" y="244"/>
</view>
</objects>
<resources>
Expand Down
6 changes: 3 additions & 3 deletions Clocker/Appearance Tab/CLAppearanceView.xib
Expand Up @@ -93,8 +93,8 @@
</connections>
</segmentedControl>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="3d9-qg-dNb">
<rect key="frame" x="148" y="111" width="142" height="18"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="Show Sunrise, Sunset Time" id="ZP5-1i-Bm8">
<rect key="frame" x="132" y="111" width="175" height="18"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="Show Sunrise, Sunset Time (Beta)" id="ZP5-1i-Bm8">
<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"/>
Expand Down Expand Up @@ -148,8 +148,8 @@
</subviews>
<constraints>
<constraint firstItem="72r-oi-X0f" firstAttribute="top" secondItem="HTZ-1V-qZb" secondAttribute="bottom" constant="8" id="23z-Z7-vpe"/>
<constraint firstItem="HTZ-1V-qZb" firstAttribute="top" secondItem="atA-2r-FXV" secondAttribute="bottom" constant="15" id="55C-jv-7Rw"/>
<constraint firstItem="YQi-x8-6f8" firstAttribute="centerX" secondItem="Hz6-mo-xeY" secondAttribute="centerX" id="6LU-d8-lKX"/>
<constraint firstAttribute="bottom" secondItem="72r-oi-X0f" secondAttribute="bottom" constant="20" id="9Bg-Cy-0Hw"/>
<constraint firstItem="3d9-qg-dNb" firstAttribute="centerX" secondItem="Hz6-mo-xeY" secondAttribute="centerX" id="FBj-0N-ltc"/>
<constraint firstItem="OrL-Ix-fmY" firstAttribute="centerX" secondItem="Hz6-mo-xeY" secondAttribute="centerX" id="JtZ-ra-RaC"/>
<constraint firstItem="1eh-BT-2fK" firstAttribute="top" secondItem="YQi-x8-6f8" secondAttribute="bottom" constant="8" id="POa-Gi-Prk"/>
Expand Down
26 changes: 10 additions & 16 deletions Clocker/ApplicationDelegate.m
Expand Up @@ -76,22 +76,16 @@ + (void)initialize
#pragma mark - NSApplicationDelegate

- (void)applicationDidFinishLaunching:(NSNotification *)notification
{
NSArray *defaultPreference = [[NSUserDefaults standardUserDefaults] objectForKey:CLDefaultPreferenceKey];

NSMutableArray *newDefaults = [[NSMutableArray alloc] init];

[defaultPreference enumerateObjectsUsingBlock:^(id _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {

if ([obj isKindOfClass:[NSString class]]) {
NSDictionary *defaultDictionary = @{CLTimezoneName : obj, CLCustomLabel : CLEmptyString};
[newDefaults addObject:defaultDictionary];
}
}];

if (newDefaults.count > 0)
{
NSNumber *opened = [[NSUserDefaults standardUserDefaults] objectForKey:@"noOfTimes"];
if (opened == nil)
{
[[NSUserDefaults standardUserDefaults] setObject:newDefaults forKey:CLDefaultPreferenceKey];
[[NSUserDefaults standardUserDefaults] setObject:[NSMutableArray array]
forKey:CLDefaultPreferenceKey];
NSInteger noOfTimes = opened.integerValue + 1;
NSNumber *noOfTime = [NSNumber numberWithInteger:noOfTimes];
[[NSUserDefaults standardUserDefaults] setObject:noOfTime forKey:@"noOfTimes"];;

}

NSString *defaultTheme = [[NSUserDefaults standardUserDefaults] objectForKey:CLThemeKey];
Expand All @@ -101,7 +95,7 @@ - (void)applicationDidFinishLaunching:(NSNotification *)notification

NSNumber *displaySuntimings = [[NSUserDefaults standardUserDefaults] objectForKey:CLDisplaySunTimingKey];
if (displaySuntimings == nil) {
[[NSUserDefaults standardUserDefaults] setObject:[NSNumber numberWithInteger:0] forKey:CLDisplaySunTimingKey];
[[NSUserDefaults standardUserDefaults] setObject:[NSNumber numberWithInteger:1] forKey:CLDisplaySunTimingKey];
}

NSNumber *displayFutureSlider = [[NSUserDefaults standardUserDefaults] objectForKey:CLDisplayFutureSliderKey];
Expand Down
25 changes: 23 additions & 2 deletions Clocker/PanelController.m
Expand Up @@ -302,6 +302,9 @@ -(NSView*)tableView:(NSTableView *)tableView viewForTableColumn:(NSTableColumn *

CLTimezoneCellView *cell = [tableView makeViewWithIdentifier:CLTimezoneCellViewIdentifier owner:self];

NSTextView *customLabel = (NSTextView*)[cell.relativeDate.window fieldEditor:YES
forObject:cell.relativeDate];

NSString *theme = [[NSUserDefaults standardUserDefaults] objectForKey:CLThemeKey];
if (theme.length > 0 && ![theme isEqualToString:@"Default"])
{
Expand All @@ -310,13 +313,16 @@ -(NSView*)tableView:(NSTableView *)tableView viewForTableColumn:(NSTableColumn *
self.window.alphaValue = 0.90;
[cell.customName setDrawsBackground:YES];
[cell.customName setBackgroundColor:[NSColor blackColor]];
customLabel.insertionPointColor = [NSColor whiteColor];
}
else
{

[cell updateTextColorWithColor:[NSColor blackColor] andCell:cell];
[cell.customName setDrawsBackground:NO];
[self.mainTableview setBackgroundColor:[NSColor whiteColor]];
self.window.alphaValue = 1;
customLabel.insertionPointColor = [NSColor blackColor];
}

cell.relativeDate.stringValue = [self getDateForTimeZone:self.defaultPreferences[row]];
Expand Down Expand Up @@ -574,6 +580,12 @@ -(void)tableView:(NSTableView *)tableView setObjectValue:(id)object forTableColu
if ([object isKindOfClass:[NSString class]])
{
NSMutableDictionary *timezoneDictionary = self.defaultPreferences[row];

if ([self.defaultPreferences[row][CLTimezoneName] isEqualToString:object])
{
return;
}

NSMutableDictionary *mutableTimeZoneDict = [timezoneDictionary mutableCopy];
[mutableTimeZoneDict setValue:object forKey:CLCustomLabel];
[self.defaultPreferences replaceObjectAtIndex:row withObject:mutableTimeZoneDict];
Expand All @@ -591,12 +603,21 @@ -(BOOL)tableView:(NSTableView *)tableView acceptDrop:(id<NSDraggingInfo>)info ro

NSIndexSet *rowIndexes = [NSKeyedUnarchiver unarchiveObjectWithData:data];

[self.defaultPreferences exchangeObjectAtIndex:rowIndexes.firstIndex withObjectAtIndex:row];
[self.defaultPreferences exchangeObjectAtIndex:rowIndexes.firstIndex
withObjectAtIndex:row];

[[NSUserDefaults standardUserDefaults] setObject:self.defaultPreferences forKey:CLDefaultPreferenceKey];
[[NSUserDefaults standardUserDefaults] setObject:self.defaultPreferences
forKey:CLDefaultPreferenceKey];

[self.mainTableview reloadData];

for (NSWindow *window in [NSApplication sharedApplication].windows) {
if ([window.windowController isMemberOfClass:[CLPreferencesViewController class]]) {
CLPreferencesViewController *ref = (CLPreferencesViewController *) window.windowController;
[ref refereshTimezoneTableView];
}
}

return YES;
}

Expand Down
2 changes: 2 additions & 0 deletions Clocker/Preferences/CLPreferencesViewController.h
Expand Up @@ -22,4 +22,6 @@ typedef enum : NSUInteger {
@property (atomic, strong) NSArray *themes;
@property (nonatomic, strong) NSURLSessionDataTask *dataTask;

- (void)refereshTimezoneTableView;

@end
Binary file added Icons/NewIcon-1024.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Icons/NewIcon-128.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Icons/NewIcon-16.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Icons/NewIcon-256.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Icons/NewIcon-32.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Icons/NewIcon-512.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Icons/NewIcon-64.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Icons/NewIcon.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Icons/NewIcon.xcf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed Media.xcassets/AppIcon.appiconset/ClockerIcon-32.png
Binary file not shown.
Binary file removed Media.xcassets/AppIcon.appiconset/ClockerIcon-33.png
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed Media.xcassets/AppIcon.appiconset/ClockerIcon-64.png
Binary file not shown.
Binary file removed Media.xcassets/AppIcon.appiconset/ClockerIcon.png
Binary file not shown.
20 changes: 10 additions & 10 deletions Media.xcassets/AppIcon.appiconset/Contents.json
Expand Up @@ -3,61 +3,61 @@
{
"size" : "16x16",
"idiom" : "mac",
"filename" : "ClockerIcon-16.png",
"filename" : "NewIcon-16.png",
"scale" : "1x"
},
{
"size" : "16x16",
"idiom" : "mac",
"filename" : "ClockerIcon-33.png",
"filename" : "NewIcon-32.png",
"scale" : "2x"
},
{
"size" : "32x32",
"idiom" : "mac",
"filename" : "ClockerIcon-32.png",
"filename" : "NewIcon-33.png",
"scale" : "1x"
},
{
"size" : "32x32",
"idiom" : "mac",
"filename" : "ClockerIcon-64.png",
"filename" : "NewIcon-64.png",
"scale" : "2x"
},
{
"size" : "128x128",
"idiom" : "mac",
"filename" : "ClockerIcon.png",
"filename" : "NewIcon-128.png",
"scale" : "1x"
},
{
"size" : "128x128",
"idiom" : "mac",
"filename" : "ClockerIcon-258.png",
"filename" : "NewIcon-256.png",
"scale" : "2x"
},
{
"size" : "256x256",
"idiom" : "mac",
"filename" : "ClockerIcon-256.png",
"filename" : "NewIcon-257.png",
"scale" : "1x"
},
{
"size" : "256x256",
"idiom" : "mac",
"filename" : "ClockerIcon-514.png",
"filename" : "NewIcon-512.png",
"scale" : "2x"
},
{
"size" : "512x512",
"idiom" : "mac",
"filename" : "ClockerIcon-512.png",
"filename" : "NewIcon-513.png",
"scale" : "1x"
},
{
"size" : "512x512",
"idiom" : "mac",
"filename" : "ClockerIcon-1024.png",
"filename" : "NewIcon-1024.png",
"scale" : "2x"
}
],
Expand Down
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Media.xcassets/AppIcon.appiconset/NewIcon-128.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Media.xcassets/AppIcon.appiconset/NewIcon-16.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Media.xcassets/AppIcon.appiconset/NewIcon-256.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Media.xcassets/AppIcon.appiconset/NewIcon-257.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Media.xcassets/AppIcon.appiconset/NewIcon-32.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Media.xcassets/AppIcon.appiconset/NewIcon-33.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Media.xcassets/AppIcon.appiconset/NewIcon-512.png
Binary file added Media.xcassets/AppIcon.appiconset/NewIcon-513.png
Binary file added Media.xcassets/AppIcon.appiconset/NewIcon-64.png
Diff not rendered.
2 changes: 1 addition & 1 deletion Media.xcassets/ClockerIcon-16.imageset/Contents.json
Expand Up @@ -2,7 +2,7 @@
"images" : [
{
"idiom" : "universal",
"filename" : "ClockerIcon-16.png",
"filename" : "NewIcon-16.png",
"scale" : "1x"
},
{
Expand Down
Diff not rendered.
2 changes: 1 addition & 1 deletion Media.xcassets/ClockerIcon-256.imageset/Contents.json
Expand Up @@ -2,7 +2,7 @@
"images" : [
{
"idiom" : "universal",
"filename" : "ClockerIcon-256.png",
"filename" : "NewIcon-256.png",
"scale" : "1x"
},
{
Expand Down
Binary file modified Media.xcassets/Settings-White.imageset/Settings-White.png
Binary file modified Screenshots/Screenshot1.png
Binary file modified Screenshots/Screenshot2.png
Binary file modified Screenshots/Screenshot3.png

0 comments on commit 72f7486

Please sign in to comment.