Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(570)

Side by Side Diff: chrome/browser/ui/cocoa/hover_close_button.mm

Issue 10556030: mac: Fix close button appearance in HiDPI. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: . Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | third_party/molokocacao/NSBezierPath+MCAdditions.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import "chrome/browser/ui/cocoa/hover_close_button.h" 5 #import "chrome/browser/ui/cocoa/hover_close_button.h"
6 6
7 #include "base/memory/scoped_nsobject.h" 7 #include "base/memory/scoped_nsobject.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #import "chrome/browser/ui/cocoa/animation_utils.h" 9 #import "chrome/browser/ui/cocoa/animation_utils.h"
10 #include "grit/generated_resources.h" 10 #include "grit/generated_resources.h"
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 [[NSColor whiteColor] set]; 308 [[NSColor whiteColor] set];
309 [xPath fill]; 309 [xPath fill];
310 310
311 // Give the 'x' an inner shadow for depth. If the button is in a hover state 311 // Give the 'x' an inner shadow for depth. If the button is in a hover state
312 // (circle behind it), then adjust the shadow accordingly (not as harsh). 312 // (circle behind it), then adjust the shadow accordingly (not as harsh).
313 NSShadow* shadow = [[[NSShadow alloc] init] autorelease]; 313 NSShadow* shadow = [[[NSShadow alloc] init] autorelease];
314 CGFloat alpha = (hoverState != kHoverStateNone) ? 314 CGFloat alpha = (hoverState != kHoverStateNone) ?
315 kXShadowCircleAlpha : kXShadowAlpha; 315 kXShadowCircleAlpha : kXShadowAlpha;
316 [shadow setShadowColor:[NSColor colorWithCalibratedWhite:0.15 alpha:alpha]]; 316 [shadow setShadowColor:[NSColor colorWithCalibratedWhite:0.15 alpha:alpha]];
317 [shadow setShadowOffset:NSMakeSize(0.0, 0.0)]; 317 [shadow setShadowOffset:NSMakeSize(0.0, 0.0)];
318 [shadow setShadowBlurRadius:2.75 * scale]; 318 [shadow setShadowBlurRadius:2.5];
319 [xPath fillWithInnerShadow:shadow scale:scale]; 319 [xPath fillWithInnerShadow:shadow];
320 return imageRep; 320 return imageRep;
321 } 321 }
322 322
323 @end 323 @end
OLDNEW
« no previous file with comments | « no previous file | third_party/molokocacao/NSBezierPath+MCAdditions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698