diff --git a/Clocker.xcodeproj/project.pbxproj b/Clocker.xcodeproj/project.pbxproj
index 6b1c367..6d70588 100755
--- a/Clocker.xcodeproj/project.pbxproj
+++ b/Clocker.xcodeproj/project.pbxproj
@@ -410,6 +410,9 @@
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 0;
+ knownRegions = (
+ en,
+ );
mainGroup = DD4F7BF913C30F9F00825C6E;
productRefGroup = DD4F7C0513C30F9F00825C6E /* Products */;
projectDirPath = "";
diff --git a/Clocker.xcodeproj/project.xcworkspace/xcuserdata/abhishekbanthia.xcuserdatad/UserInterfaceState.xcuserstate b/Clocker.xcodeproj/project.xcworkspace/xcuserdata/abhishekbanthia.xcuserdatad/UserInterfaceState.xcuserstate
index eb21bb9..350453e 100644
Binary files a/Clocker.xcodeproj/project.xcworkspace/xcuserdata/abhishekbanthia.xcuserdatad/UserInterfaceState.xcuserstate and b/Clocker.xcodeproj/project.xcworkspace/xcuserdata/abhishekbanthia.xcuserdatad/UserInterfaceState.xcuserstate differ
diff --git a/Clocker/CLOneWindow/CLOneWindow.xib b/Clocker/CLOneWindow/CLOneWindow.xib
index 9e4f950..df7abfa 100644
--- a/Clocker/CLOneWindow/CLOneWindow.xib
+++ b/Clocker/CLOneWindow/CLOneWindow.xib
@@ -27,7 +27,6 @@
-
@@ -36,7 +35,6 @@
-
@@ -47,7 +45,6 @@
-
diff --git a/Clocker/CLOneWindow/CLOneWindowController.h b/Clocker/CLOneWindow/CLOneWindowController.h
index 7305b7c..5f3125a 100644
--- a/Clocker/CLOneWindow/CLOneWindowController.h
+++ b/Clocker/CLOneWindow/CLOneWindowController.h
@@ -12,12 +12,6 @@
@interface CLOneWindowController : NSWindowController
-typedef enum : NSUInteger {
- GeneralPane,
- AppearancePane,
- AboutUsPane
-}PaneSelection;
-
@property (strong, nonatomic) CLPreferencesViewController *preferencesView;
@property (strong, nonatomic) CLAboutUsViewController *aboutUsView;
diff --git a/Clocker/CLOneWindow/CLOneWindowController.m b/Clocker/CLOneWindow/CLOneWindowController.m
index 4c41e42..1ac2f31 100644
--- a/Clocker/CLOneWindow/CLOneWindowController.m
+++ b/Clocker/CLOneWindow/CLOneWindowController.m
@@ -45,7 +45,6 @@ static CLOneWindowController *sharedWindow = nil;
- (IBAction)openPreferences:(id)sender
{
-
self.preferencesView = [[CLPreferencesViewController alloc] initWithNibName:@"CLPreferencesView" bundle:nil];
[self setWindowWithContentView:self.preferencesView.view];
[self.aboutUsView.view removeFromSuperview];
@@ -60,11 +59,11 @@ static CLOneWindowController *sharedWindow = nil;
- (IBAction)openAboutUsView:(id)sender
{
- [self.preferencesView.view removeFromSuperview];
- self.preferencesView = nil;
self.aboutUsView = [[CLAboutUsViewController alloc] initWithNibName:@"CLAboutUsView" bundle:nil];
[self setWindowWithContentView:self.aboutUsView.view];
-
+ [self.preferencesView.view removeFromSuperview];
+ self.preferencesView = nil;
}
+
@end
diff --git a/Clocker/Custom Table Cell Views/CLTimezoneCellView.h b/Clocker/Custom Table Cell Views/CLTimezoneCellView.h
index fa14fbc..d6944b9 100644
--- a/Clocker/Custom Table Cell Views/CLTimezoneCellView.h
+++ b/Clocker/Custom Table Cell Views/CLTimezoneCellView.h
@@ -14,5 +14,6 @@
@property (weak) IBOutlet NSTextField *relativeDate;
@property (weak) IBOutlet NSTextField *time;
@property (nonatomic) NSInteger rowNumber;
+- (void)updateFontFamilyWithFontName:(NSString *)fontName andCell:(CLTimezoneCellView*)cell;
@end
diff --git a/Clocker/Custom Table Cell Views/CLTimezoneCellView.m b/Clocker/Custom Table Cell Views/CLTimezoneCellView.m
index 6ecc357..a16844f 100644
--- a/Clocker/Custom Table Cell Views/CLTimezoneCellView.m
+++ b/Clocker/Custom Table Cell Views/CLTimezoneCellView.m
@@ -45,4 +45,11 @@
}
}
+- (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:31];
+}
+
@end
diff --git a/Clocker/Panel.xib b/Clocker/Panel.xib
index e9d8549..d2b99a3 100755
--- a/Clocker/Panel.xib
+++ b/Clocker/Panel.xib
@@ -85,9 +85,9 @@
-
+
-
+
@@ -100,7 +100,7 @@
-
+
diff --git a/Clocker/PanelController.h b/Clocker/PanelController.h
index 7725a2c..ca577a8 100755
--- a/Clocker/PanelController.h
+++ b/Clocker/PanelController.h
@@ -56,7 +56,6 @@
@property (nonatomic, strong) NSMutableArray *defaultPreferences;
@property (nonatomic) BOOL hasActivePanel;
-@property (nonatomic) NSInteger previousSelectedRow; //for color changes on row selection
@property (nonatomic, unsafe_unretained, readonly) id delegate;
@property (weak) IBOutlet NSTableView *mainTableview;
diff --git a/Clocker/PanelController.m b/Clocker/PanelController.m
index 543dd55..904d589 100755
--- a/Clocker/PanelController.m
+++ b/Clocker/PanelController.m
@@ -274,10 +274,15 @@ NSString *const CLTimezoneCellViewIdentifier = @"timeZoneCell";
CLRatingCellView *cellView = [self.mainTableview makeViewWithIdentifier:CLRatingCellViewIdentifier owner:self];
return cellView;
}
-
CLTimezoneCellView *cell = [tableView makeViewWithIdentifier:CLTimezoneCellViewIdentifier owner:self];
-
+
+ NSString *fontFamily = [[NSUserDefaults standardUserDefaults] objectForKey:@"defaultFontFamily"];
+
+ if (fontFamily.length > 0)
+ {
+ [cell updateFontFamilyWithFontName:fontFamily andCell:cell];
+ }
cell.relativeDate.stringValue = [self getDateForTimeZone:self.defaultPreferences[row][CLTimezoneName]];
diff --git a/Clocker/Preferences/CLPreferencesView.xib b/Clocker/Preferences/CLPreferencesView.xib
index 4f6bf17..21308c8 100644
--- a/Clocker/Preferences/CLPreferencesView.xib
+++ b/Clocker/Preferences/CLPreferencesView.xib
@@ -7,9 +7,11 @@
+
+
@@ -18,11 +20,11 @@
-
+
-
+
-
+
@@ -107,7 +109,7 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
@@ -164,7 +279,7 @@
-
+
diff --git a/Clocker/Preferences/CLPreferencesViewController.h b/Clocker/Preferences/CLPreferencesViewController.h
index 99bc477..676dbd3 100644
--- a/Clocker/Preferences/CLPreferencesViewController.h
+++ b/Clocker/Preferences/CLPreferencesViewController.h
@@ -14,5 +14,7 @@
@property (strong, nonatomic) NSMutableArray *selectedTimeZones;
@property (strong, nonatomic) NSArray *filteredArray;
@property (atomic, assign) BOOL launchOnLogin;
+@property (atomic, strong) NSArray *fontFamilies;
+@property (atomic, strong) NSArray *themes;
@end
diff --git a/Clocker/Preferences/CLPreferencesViewController.m b/Clocker/Preferences/CLPreferencesViewController.m
index 127725d..5b6bdf3 100644
--- a/Clocker/Preferences/CLPreferencesViewController.m
+++ b/Clocker/Preferences/CLPreferencesViewController.m
@@ -24,10 +24,10 @@ NSString *const CLPreferencesAvailableTimezoneIdentifier = @"availableTimezones"
@property (weak) IBOutlet NSTableView *timezoneTableView;
@property (strong) IBOutlet Panel *timezonePanel;
-
+@property (weak) IBOutlet NSPopUpButton *themePopUp;
+@property (weak) IBOutlet NSPopUpButton *fontPopUp;
@property (weak) IBOutlet NSTableView *availableTimezoneTableView;
@property (weak) IBOutlet NSSearchField *searchField;
-
@property (weak) IBOutlet NSButton *is24HourFormatSelected;
@property (weak) IBOutlet NSTextField *messageLabel;
@@ -52,7 +52,6 @@ NSString *const CLPreferencesAvailableTimezoneIdentifier = @"availableTimezones"
if (!self.timeZoneArray)
{
self.timeZoneArray = [[NSMutableArray alloc] initWithArray:[NSTimeZone knownTimeZoneNames]];
-
self.filteredArray = [[NSArray alloc] init];
}
@@ -62,10 +61,34 @@ NSString *const CLPreferencesAvailableTimezoneIdentifier = @"availableTimezones"
//Register for drag and drop
[self.timezoneTableView registerForDraggedTypes: [NSArray arrayWithObject: CLDragSessionKey]];
+
+ NSMutableSet *sampleArray = [[NSMutableSet alloc] init];
+
+ NSFontCollection *fontCollection = [NSFontCollection fontCollectionWithName:@"com.apple.UserFonts"];
+
+ for (NSFontDescriptor *descriptor in fontCollection.matchingDescriptors) {
+ if ([descriptor objectForKey:@"NSFontFamilyAttribute"]) {
+ if (![sampleArray containsObject:[descriptor objectForKey:@"NSFontFamilyAttribute"]]) {
+ [sampleArray addObject:[descriptor objectForKey:@"NSFontFamilyAttribute"]];
+ }
+ }
+ }
+
+ if ([sampleArray containsObject:@"Apple Chancery"]) {
+ [sampleArray removeObject:@"Apple Chancery"];
+ [sampleArray removeObject:@"Zapfino"];
+ [sampleArray removeObject:@"Trattatello"];
+ [sampleArray removeObject:@"Noteworthy"];
+
+ }
+
+ self.fontFamilies = [[NSArray alloc] initWithArray:sampleArray.allObjects];
// Do view setup here.
}
+
+
-(void)dealloc
{
[[NSNotificationCenter defaultCenter] removeObserver:self
@@ -407,4 +430,32 @@ NSString *const CLPreferencesAvailableTimezoneIdentifier = @"availableTimezones"
}
}
+- (IBAction)changeTheme:(id)sender {
+}
+
+- (IBAction)changeFont:(id)sender
+{
+ ApplicationDelegate *appDelegate = [[NSApplication sharedApplication] delegate];
+ PanelController *panelController = appDelegate.panelController;
+
+
+}
+
+- (IBAction)changeTransparency:(id)sender
+{
+ ApplicationDelegate *appDelegate = [[NSApplication sharedApplication] delegate];
+ PanelController *panelController = appDelegate.panelController;
+ NSSlider *slider = (NSSlider *)sender;
+
+ if (![panelController.window isVisible])
+ {
+ [panelController openPanel];
+ }
+ [NSAnimationContext beginGrouping];
+ [[NSAnimationContext currentContext] setDuration:0.10];
+ [[panelController.window animator] setAlphaValue:slider.floatValue/100];
+ [NSAnimationContext endGrouping];
+}
+
+
@end
diff --git a/Media.xcassets/Black Theme.imageset/Contents.json b/Media.xcassets/Black Theme.imageset/Contents.json
new file mode 100644
index 0000000..121f919
--- /dev/null
+++ b/Media.xcassets/Black Theme.imageset/Contents.json
@@ -0,0 +1,21 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "filename" : "Screen Shot 2015-12-13 at 3.26.58 AM.png",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
\ No newline at end of file
diff --git a/Media.xcassets/Black Theme.imageset/Screen Shot 2015-12-13 at 3.26.58 AM.png b/Media.xcassets/Black Theme.imageset/Screen Shot 2015-12-13 at 3.26.58 AM.png
new file mode 100644
index 0000000..22a3ce6
Binary files /dev/null and b/Media.xcassets/Black Theme.imageset/Screen Shot 2015-12-13 at 3.26.58 AM.png differ
diff --git a/Media.xcassets/White Theme.imageset/Contents.json b/Media.xcassets/White Theme.imageset/Contents.json
new file mode 100644
index 0000000..fb7e1f8
--- /dev/null
+++ b/Media.xcassets/White Theme.imageset/Contents.json
@@ -0,0 +1,21 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "filename" : "Screen Shot 2015-12-13 at 3.27.22 AM.png",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
\ No newline at end of file
diff --git a/Media.xcassets/White Theme.imageset/Screen Shot 2015-12-13 at 3.27.22 AM.png b/Media.xcassets/White Theme.imageset/Screen Shot 2015-12-13 at 3.27.22 AM.png
new file mode 100644
index 0000000..fec8c0c
Binary files /dev/null and b/Media.xcassets/White Theme.imageset/Screen Shot 2015-12-13 at 3.27.22 AM.png differ