Browse Source

Minor UI glitches.

v1.2.3
Abhishek Banthia 9 years ago
parent
commit
2aba6c06ec
  1. BIN
      Clocker.xcodeproj/project.xcworkspace/xcuserdata/abhishekbanthia.xcuserdatad/UserInterfaceState.xcuserstate
  2. 2
      Clocker/Appearance Tab/CLAppearanceViewController.m
  3. 1
      Clocker/MenubarController.h
  4. 2
      Clocker/MenubarController.m
  5. 22
      Clocker/Preferences/CLPreferencesViewController.m
  6. 7
      Clocker/StatusItemView.m

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

Binary file not shown.

2
Clocker/Appearance Tab/CLAppearanceViewController.m

@ -91,6 +91,8 @@
[panelController.mainTableview reloadData];
[appDelegate.menubarController shouldIconBeUpdated:YES];
});
}

1
Clocker/MenubarController.h

@ -43,5 +43,6 @@
@property (nonatomic, strong) NSTimer *iconUpdateTimer;
- (void)setInitialTimezoneData;
- (void)shouldIconBeUpdated:(BOOL)value;
@end

2
Clocker/MenubarController.m

@ -80,6 +80,8 @@
}
else
{
//Call setNeedsDisplay to change the icon and then invalidate the timer
[self.statusItemView setNeedsDisplay:YES];
[self.iconUpdateTimer invalidate];
self.iconUpdateTimer = nil;
}

22
Clocker/Preferences/CLPreferencesViewController.m

@ -228,7 +228,6 @@ NSString *const CLTryAgainMessage = @"Try again, maybe?";
forKey:@"favouriteTimezone"];
}
[self refreshMainTableview];
}
else
@ -250,12 +249,23 @@ NSString *const CLTryAgainMessage = @"Try again, maybe?";
[newArray replaceObjectAtIndex:row withObject:encodedObject];
[[NSUserDefaults standardUserDefaults] setObject:newArray forKey:CLDefaultPreferenceKey];
ApplicationDelegate *appDelegate = (ApplicationDelegate*)[NSApplication sharedApplication].delegate;
if (dataObject.isFavourite.integerValue == 1)
{
[[NSUserDefaults standardUserDefaults] setObject:encodedObject
forKey:@"favouriteTimezone"];
[appDelegate.menubarController shouldIconBeUpdated:YES];
}
else
{
[[NSUserDefaults standardUserDefaults] setObject:nil
forKey:@"favouriteTimezone"];
[appDelegate.menubarController shouldIconBeUpdated:NO];
}
(dataObject.isFavourite.integerValue == 1) ?
[[NSUserDefaults standardUserDefaults] setObject:encodedObject
forKey:@"favouriteTimezone"]:
[[NSUserDefaults standardUserDefaults] setObject:nil
forKey:@"favouriteTimezone"];
[self refereshTimezoneTableView];

7
Clocker/StatusItemView.m

@ -76,7 +76,7 @@
textField.stringValue = [timezoneObject getMenuTitle];
// Set up dark mode for icon
if ([[[NSUserDefaults standardUserDefaults] stringForKey:@"AppleInterfaceStyle"] isEqual: @"Dark"])
if ([[[NSUserDefaults standardUserDefaults] stringForKey:@"AppleInterfaceStyle"] isEqualToString:@"Dark"])
{
textField.textColor = [NSColor whiteColor];
self.image = [self imageWithSubviewsWithTextField:textField];
@ -96,13 +96,12 @@
CGRect newRect = CGRectMake(dirtyRect.origin.x, dirtyRect.origin.y, textField.frame.size.width+5, dirtyRect.size.height);
[self.statusItem drawStatusBarBackgroundInRect:newRect withHighlight:NO];
}
else
{
self.image = [NSImage imageNamed:@"MenuIcon"];
self.statusItem.length = 24;
[self.statusItem drawStatusBarBackgroundInRect:CGRectMake(0, 0, self.image.size.width, self.image.size.height) withHighlight:NO];
self.statusItem.length = 24;
[self.statusItem drawStatusBarBackgroundInRect:CGRectMake(0, 0, self.image.size.width, self.image.size.height) withHighlight:NO];
}

Loading…
Cancel
Save