diff --git a/Clocker.xcodeproj/project.xcworkspace/xcuserdata/abhishekbanthia.xcuserdatad/UserInterfaceState.xcuserstate b/Clocker.xcodeproj/project.xcworkspace/xcuserdata/abhishekbanthia.xcuserdatad/UserInterfaceState.xcuserstate index 541b2c1..be2e047 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/ApplicationDelegate.m b/Clocker/ApplicationDelegate.m index 5773022..2d12865 100755 --- a/Clocker/ApplicationDelegate.m +++ b/Clocker/ApplicationDelegate.m @@ -112,7 +112,6 @@ void *kContextActivePanel = &kContextActivePanel; [[NSUserDefaults standardUserDefaults] setObject:@"Default" forKey:@"defaultTheme"]; } - // Install icon into the menu bar self.menubarController = [[MenubarController alloc] init]; diff --git a/Clocker/Images/PowerIcon-White.png b/Clocker/Images/PowerIcon-White.png index 80bdd4d..7200797 100644 Binary files a/Clocker/Images/PowerIcon-White.png and b/Clocker/Images/PowerIcon-White.png differ diff --git a/Clocker/Images/Settings-White.png b/Clocker/Images/Settings-White.png new file mode 100644 index 0000000..44ca6a8 Binary files /dev/null and b/Clocker/Images/Settings-White.png differ diff --git a/Clocker/Images/WhiteButton.png b/Clocker/Images/WhiteButton.png new file mode 100644 index 0000000..636a77c Binary files /dev/null and b/Clocker/Images/WhiteButton.png differ diff --git a/Clocker/Panel.xib b/Clocker/Panel.xib index 0370f6d..97d5d23 100755 --- a/Clocker/Panel.xib +++ b/Clocker/Panel.xib @@ -86,12 +86,12 @@ - + - + - + @@ -104,7 +104,7 @@ - + diff --git a/Clocker/PanelController.h b/Clocker/PanelController.h index 8c60a06..6b0d491 100755 --- a/Clocker/PanelController.h +++ b/Clocker/PanelController.h @@ -73,5 +73,6 @@ - (void)closePanel; - (void)updateDefaultPreferences; - (void)showOptions:(BOOL)value; +- (void)updateWindowTransparency; @end diff --git a/Clocker/PanelController.m b/Clocker/PanelController.m index ec63f1a..465735c 100755 --- a/Clocker/PanelController.m +++ b/Clocker/PanelController.m @@ -82,6 +82,17 @@ NSString *const CLTimezoneCellViewIdentifier = @"timeZoneCell"; [self updateDefaultPreferences]; + if ([[[NSUserDefaults standardUserDefaults] objectForKey:@"defaultTheme"] isEqualToString:@"Black"]) { + self.shutdownButton.image = [NSImage imageNamed:@"PowerIcon-White"]; + self.preferencesButton.image = [NSImage imageNamed:@"Settings-White"]; + } + else + { + self.shutdownButton.image = [NSImage imageNamed:@"PowerIcon"]; + self.preferencesButton.image = [NSImage imageNamed:NSImageNameActionTemplate]; + } + + [self updateDefaultPreferences]; self.mainTableview.selectionHighlightStyle = NSTableViewSelectionHighlightStyleNone; // Make a fully skinned panel @@ -275,6 +286,10 @@ NSString *const CLTimezoneCellViewIdentifier = @"timeZoneCell"; return cellView; } + if (row == self.defaultPreferences.count) { + [self updateWindowTransparency]; + } + CLTimezoneCellView *cell = [tableView makeViewWithIdentifier:CLTimezoneCellViewIdentifier owner:self]; NSString *fontFamily = [[NSUserDefaults standardUserDefaults] objectForKey:@"defaultFontFamily"]; diff --git a/Clocker/Preferences/CLPreferencesView.xib b/Clocker/Preferences/CLPreferencesView.xib index 002e0bb..e086219 100644 --- a/Clocker/Preferences/CLPreferencesView.xib +++ b/Clocker/Preferences/CLPreferencesView.xib @@ -20,11 +20,11 @@ - + - + @@ -109,7 +109,7 @@ - + @@ -156,7 +156,7 @@ - + @@ -178,7 +178,7 @@ - + @@ -188,27 +188,8 @@ - - - - - - - - - - - - - - - - - - - - + @@ -216,7 +197,7 @@ - + @@ -224,7 +205,7 @@ - + @@ -233,24 +214,20 @@ - + - - - - + - @@ -264,7 +241,7 @@ - + diff --git a/Clocker/Preferences/CLPreferencesViewController.m b/Clocker/Preferences/CLPreferencesViewController.m index 67cd6a2..1138f93 100644 --- a/Clocker/Preferences/CLPreferencesViewController.m +++ b/Clocker/Preferences/CLPreferencesViewController.m @@ -31,6 +31,7 @@ NSString *const CLPreferencesAvailableTimezoneIdentifier = @"availableTimezones" @property (weak) IBOutlet NSButton *is24HourFormatSelected; @property (weak) IBOutlet NSTextField *messageLabel; +@property (weak) IBOutlet NSSlider *transparencySlider; @end @implementation CLPreferencesViewController @@ -77,7 +78,7 @@ NSString *const CLPreferencesAvailableTimezoneIdentifier = @"availableTimezones" //Certain fonts don't look good with constraints set NSArray *fontsToRemove = [NSArray arrayWithObjects:@"Apple Chancery", @"Zapfino", - @"Trattatello", @"Noteworthy", @"Arial Black", @"Chalkduster",@"Monoid", nil]; + @"Trattatello", @"Noteworthy", @"Arial Black", @"Chalkduster",@"Monoid", @"Andale Mono", @"Courier" ,@"Courier New",@"Geneva",@"Menlo", @"Monaco",@"PT Mono", @"Verdana", nil]; for (NSString *font in fontsToRemove) { if([availableFonts containsObject:font]) { @@ -449,29 +450,21 @@ NSString *const CLPreferencesAvailableTimezoneIdentifier = @"availableTimezones" PanelController *panelController = appDelegate.panelController; [panelController.backgroundView setNeedsDisplay:YES]; + if ([[popUpButtonTitle titleOfSelectedItem] isEqualToString:@"Black"]) { panelController.shutdownButton.image = [NSImage imageNamed:@"PowerIcon-White"]; + panelController.preferencesButton.image = [NSImage imageNamed:@"Settings-White"]; } else { panelController.shutdownButton.image = [NSImage imageNamed:@"PowerIcon"]; + panelController.preferencesButton.image = [NSImage imageNamed:NSImageNameActionTemplate]; } [panelController.mainTableview reloadData]; } -- (IBAction)changeTransparency:(id)sender -{ - ApplicationDelegate *appDelegate = [[NSApplication sharedApplication] delegate]; - PanelController *panelController = appDelegate.panelController; - NSSlider *slider = (NSSlider *)sender; - - [NSAnimationContext beginGrouping]; - [[NSAnimationContext currentContext] setDuration:0.10]; - [[panelController.window animator] setAlphaValue:slider.floatValue/100]; - [NSAnimationContext endGrouping]; -} @end diff --git a/Media.xcassets/PowerIcon-White.imageset/Contents.json b/Media.xcassets/PowerIcon-White.imageset/Contents.json index 98c0ad9..9031c3f 100644 --- a/Media.xcassets/PowerIcon-White.imageset/Contents.json +++ b/Media.xcassets/PowerIcon-White.imageset/Contents.json @@ -2,7 +2,7 @@ "images" : [ { "idiom" : "universal", - "filename" : "PowerIcon-White.png", + "filename" : "PowerIcon-Whitw2.png", "scale" : "1x" }, { diff --git a/Media.xcassets/PowerIcon-White.imageset/PowerIcon-White.png b/Media.xcassets/PowerIcon-White.imageset/PowerIcon-White.png deleted file mode 100644 index 80bdd4d..0000000 Binary files a/Media.xcassets/PowerIcon-White.imageset/PowerIcon-White.png and /dev/null differ diff --git a/Media.xcassets/PowerIcon-White.imageset/PowerIcon-Whitw2.png b/Media.xcassets/PowerIcon-White.imageset/PowerIcon-Whitw2.png new file mode 100644 index 0000000..7200797 Binary files /dev/null and b/Media.xcassets/PowerIcon-White.imageset/PowerIcon-Whitw2.png differ diff --git a/Media.xcassets/Settings-White.imageset/Contents.json b/Media.xcassets/Settings-White.imageset/Contents.json new file mode 100644 index 0000000..0e4ac62 --- /dev/null +++ b/Media.xcassets/Settings-White.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "Settings-White.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/Settings-White.imageset/Settings-White.png b/Media.xcassets/Settings-White.imageset/Settings-White.png new file mode 100644 index 0000000..44ca6a8 Binary files /dev/null and b/Media.xcassets/Settings-White.imageset/Settings-White.png differ diff --git a/Media.xcassets/WhiteButton.imageset/Contents.json b/Media.xcassets/WhiteButton.imageset/Contents.json new file mode 100644 index 0000000..0a81de6 --- /dev/null +++ b/Media.xcassets/WhiteButton.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "WhiteButton.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/WhiteButton.imageset/WhiteButton.png b/Media.xcassets/WhiteButton.imageset/WhiteButton.png new file mode 100644 index 0000000..636a77c Binary files /dev/null and b/Media.xcassets/WhiteButton.imageset/WhiteButton.png differ