From d8f57a0ecc312c26052dc50bf16d28edd0a433dd Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Thu, 18 Sep 2014 16:17:49 +0800 Subject: [PATCH] Correct code style. --- atom/browser/native_window_mac.mm | 22 +++++++++++----------- atom/browser/native_window_views.cc | 4 +++- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/atom/browser/native_window_mac.mm b/atom/browser/native_window_mac.mm index e9881eb03a..c5fd5522d6 100644 --- a/atom/browser/native_window_mac.mm +++ b/atom/browser/native_window_mac.mm @@ -203,21 +203,21 @@ static const CGFloat kAtomWindowCornerRadius = 4.0; return; // Draw edges of rounded rect. NSRect rect = NSInsetRect([self bounds], 1.0, 1.0); - CGFloat radius = rect.size.height / 2; - NSBezierPath* bezier_path = [NSBezierPath bezierPathWithRoundedRect:rect xRadius:radius yRadius:radius]; - [bezier_path setLineWidth:2.0]; - [[NSColor grayColor] set]; - [bezier_path stroke]; + CGFloat radius = rect.size.height / 2; + NSBezierPath* bezier_path = [NSBezierPath bezierPathWithRoundedRect:rect xRadius:radius yRadius:radius]; + [bezier_path setLineWidth:2.0]; + [[NSColor grayColor] set]; + [bezier_path stroke]; // Fill the rounded rect. - rect = NSInsetRect(rect, 2.0, 2.0); - radius = rect.size.height / 2; - bezier_path = [NSBezierPath bezierPathWithRoundedRect:rect xRadius:radius yRadius:radius]; - [bezier_path setLineWidth:1.0]; - [bezier_path addClip]; + rect = NSInsetRect(rect, 2.0, 2.0); + radius = rect.size.height / 2; + bezier_path = [NSBezierPath bezierPathWithRoundedRect:rect xRadius:radius yRadius:radius]; + [bezier_path setLineWidth:1.0]; + [bezier_path addClip]; // Calculate the progress width. - rect.size.width = floor(rect.size.width * ([self doubleValue] / [self maxValue])); + rect.size.width = floor(rect.size.width * ([self doubleValue] / [self maxValue])); // Fill the progress bar with color blue. [[NSColor colorWithSRGBRed:0.2 green:0.6 blue:1 alpha:1] set]; diff --git a/atom/browser/native_window_views.cc b/atom/browser/native_window_views.cc index d3eec5c1c5..0bc77b35b1 100644 --- a/atom/browser/native_window_views.cc +++ b/atom/browser/native_window_views.cc @@ -497,7 +497,9 @@ void NativeWindowViews::SetProgressBar(double progress) { } else if (progress < 0) { taskbar->SetProgressState(frame, TBPF_NOPROGRESS); } else if (progress >= 0) { - taskbar->SetProgressValue(frame, static_cast(progress*100), progress); + taskbar->SetProgressValue(frame, + static_cast(progress * 100), + progress); } #endif }