Skip to content

Commit

Permalink
Smaller font size in menubar as in original (codler#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
codler committed Aug 19, 2012
1 parent 0a0195d commit 11c169a
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions Battery Time Remaining/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -239,9 +239,19 @@ - (void)updateStatusItem

- (void)setStatusBarImage:(NSImage *)image title:(NSString *)title
{
// Image
[self.statusItem setImage:image];
[self.statusItem setAlternateImage:[self imageInvertColor:image]];
self.statusItem.title = title;

// Title
NSDictionary *attributedStyle = [NSDictionary dictionaryWithObjectsAndKeys:
// Font
[NSFont menuFontOfSize:12.5f],
NSFontAttributeName,
nil];

NSAttributedString *attributedTitle = [[NSAttributedString alloc] initWithString:title attributes:attributedStyle];
self.statusItem.attributedTitle = attributedTitle;
}

- (NSDictionary *)getAdvancedBatteryInfo
Expand Down Expand Up @@ -471,7 +481,7 @@ - (void)menuWillOpen:(NSMenu *)menu

NSDictionary *advancedAttributedStyle = [NSDictionary dictionaryWithObjectsAndKeys:
// Font
[NSFont fontWithName:@"Lucida Grande" size:[NSFont systemFontSize]+1.f],
[NSFont systemFontOfSize:[NSFont systemFontSize]+1.f],
NSFontAttributeName,
// Text color
[NSColor disabledControlTextColor],
Expand Down

0 comments on commit 11c169a

Please sign in to comment.