Browse Source

New menubar icons thanks to Miles.

v1.4.1
Abhishek Banthia 8 years ago
parent
commit
9a67a23795
  1. BIN
      Clocker.xcodeproj/project.xcworkspace/xcuserdata/abhishekbanthia.xcuserdatad/UserInterfaceState.xcuserstate
  2. 4
      Clocker.xcodeproj/xcuserdata/abhishekbanthia.xcuserdatad/xcschemes/Clocker.xcscheme
  3. 18
      Clocker/MenubarController.m
  4. 10
      Clocker/StatusItemView.m
  5. 0
      Media.xcassets/DarkModeIcon.imageset/Contents.json
  6. 0
      Media.xcassets/DarkModeIcon.imageset/clock.png
  7. 0
      Media.xcassets/DarkModeIcon.imageset/clock@2x.png
  8. 22
      Media.xcassets/LightModeIcon.imageset/Contents.json
  9. BIN
      Media.xcassets/LightModeIcon.imageset/black-transparent.png
  10. BIN
      Media.xcassets/LightModeIcon.imageset/black-transparent@2x.png

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

Binary file not shown.

4
Clocker.xcodeproj/xcuserdata/abhishekbanthia.xcuserdatad/xcschemes/Clocker.xcscheme

@ -51,9 +51,7 @@
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES"
showNonLocalizedStrings = "YES"
language = "en"
region = "CA">
showNonLocalizedStrings = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference

18
Clocker/MenubarController.m

@ -50,7 +50,23 @@ typedef void (^CompletionType)(void);
}
_statusItemView = [[StatusItemView alloc] initWithStatusItem:statusItem];
_statusItemView.image = dataObject ? [self convertTextfieldRepresentationToImage:textField] : [NSImage imageNamed:@"MenuIcon"];
if (dataObject)
{
_statusItemView.image = [self convertTextfieldRepresentationToImage:textField];
}
else
{
if ([[[NSUserDefaults standardUserDefaults] stringForKey:@"AppleInterfaceStyle"] isEqualToString:@"Dark"])
{
_statusItemView.image = [NSImage imageNamed:@"DarkModeIcon"];
}
else
{
_statusItemView.image = [NSImage imageNamed:@"LightModeIcon"];
}
}
_statusItemView.alternateImage = [NSImage imageNamed:@"StatusHighlighted"];
_statusItemView.action = @selector(togglePanel:);

10
Clocker/StatusItemView.m

@ -116,7 +116,15 @@
}
else
{
self.image = [NSImage imageNamed:@"MenuIcon"];
if ([[[NSUserDefaults standardUserDefaults] stringForKey:@"AppleInterfaceStyle"] isEqualToString:@"Dark"])
{
self.image = [NSImage imageNamed:@"DarkModeIcon"];
}
else
{
self.image = [NSImage imageNamed:@"LightModeIcon"];
}
self.statusItem.length = 24;
[self.statusItem drawStatusBarBackgroundInRect:CGRectMake(0, 0, self.image.size.width, self.image.size.height) withHighlight:NO];
}

0
Media.xcassets/AlternateIcon.imageset/Contents.json → Media.xcassets/DarkModeIcon.imageset/Contents.json vendored

0
Media.xcassets/AlternateIcon.imageset/clock.png → Media.xcassets/DarkModeIcon.imageset/clock.png vendored

Before

Width:  |  Height:  |  Size: 336 B

After

Width:  |  Height:  |  Size: 336 B

0
Media.xcassets/AlternateIcon.imageset/clock@2x.png → Media.xcassets/DarkModeIcon.imageset/clock@2x.png vendored

Before

Width:  |  Height:  |  Size: 735 B

After

Width:  |  Height:  |  Size: 735 B

22
Media.xcassets/LightModeIcon.imageset/Contents.json vendored

@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "black-transparent.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "black-transparent@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}

BIN
Media.xcassets/LightModeIcon.imageset/black-transparent.png vendored

Binary file not shown.

After

Width:  |  Height:  |  Size: 513 B

BIN
Media.xcassets/LightModeIcon.imageset/black-transparent@2x.png vendored

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Loading…
Cancel
Save