From 548febfa4cc20835e1d4d537a97ea5ff8983a305 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Thu, 7 Apr 2016 13:58:51 +0900 Subject: [PATCH] Fix style issues --- atom/browser/ui/tray_icon_cocoa.mm | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/atom/browser/ui/tray_icon_cocoa.mm b/atom/browser/ui/tray_icon_cocoa.mm index ed1a774f2eb5..c3fa3f3b9272 100644 --- a/atom/browser/ui/tray_icon_cocoa.mm +++ b/atom/browser/ui/tray_icon_cocoa.mm @@ -78,18 +78,18 @@ const CGFloat kVerticalTitleMargin = 2; BOOL highlightContent = highlight | [self isDarkMode]; CGFloat thickness = [[statusItem_ statusBar] thickness]; - // Draw the system bar background + // Draw the system bar background. [statusItem_ drawStatusBarBackgroundInRect:self.bounds withHighlight:highlight]; - // Determine which image to use - NSImage * image = image_.get(); + // Determine which image to use. + NSImage* image = image_.get(); if (inMouseEventSequence_ && alternateImage_) { image = alternateImage_.get(); } // Apply the higlight color if the image is a template image. When this moves // to using the new [NSStatusItem button] API, this should work automagically. if ([image isTemplate] == YES) { - NSImage * imageWithColor = [image copy] autorelease]; + NSImage* imageWithColor = [[image copy] autorelease]; [imageWithColor lockFocus]; [[self colorWithHighlight: highlightContent] set]; CGRect imageBounds = CGRectMake(0,0, image.size.width, image.size.height); @@ -162,17 +162,16 @@ const CGFloat kVerticalTitleMargin = 2; return [attributes size].width; } -- (NSColor*)colorWithHighlight:(BOOL)highlight -{ +- (NSColor*)colorWithHighlight:(BOOL)highlight { return highlight ? - [NSColor whiteColor] : - [NSColor colorWithRed:0.265625 green:0.25390625 blue:0.234375 alpha:1.0]; + [NSColor whiteColor] : + [NSColor colorWithRed:0.265625 green:0.25390625 blue:0.234375 alpha:1.0]; } - (NSDictionary*)titleAttributesWithHighlight:(BOOL)highlight { return @{ - NSFontAttributeName: [NSFont menuBarFontOfSize:0], - NSForegroundColorAttributeName: [self colorWithHighlight: highlight] + NSFontAttributeName:[NSFont menuBarFontOfSize:0], + NSForegroundColorAttributeName:[self colorWithHighlight: highlight] }; }