From e20597e41de65f42beb5c797cf4cd1e40530e7b9 Mon Sep 17 00:00:00 2001 From: "mark@chromium.org" Date: Wed, 16 Sep 2009 16:11:38 +0000 Subject: Avoid spurious errors about NSColor*-CGColor* and NSSize-CGSize conversions The SDK has gotten stupider in 10.6, and has conspired with the compiler, which now thinks that when the receiver is held in a scoped_nsobject, NSColor and NSSize arguments should be converted to their CG cousins. Review URL: http://codereview.chromium.org/205016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26348 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/cocoa/browser_window_controller.mm | 5 +++-- chrome/browser/cocoa/bubble_view.mm | 4 ++-- chrome/browser/cocoa/download_item_cell.mm | 4 ++-- chrome/browser/cocoa/gradient_button_cell.mm | 4 ++-- chrome/browser/cocoa/tab_cell.mm | 4 ++-- 5 files changed, 11 insertions(+), 10 deletions(-) (limited to 'chrome') diff --git a/chrome/browser/cocoa/browser_window_controller.mm b/chrome/browser/cocoa/browser_window_controller.mm index 38c5b4c..122dfc3 100644 --- a/chrome/browser/cocoa/browser_window_controller.mm +++ b/chrome/browser/cocoa/browser_window_controller.mm @@ -1091,8 +1091,9 @@ willPositionSheet:(NSWindow*)sheet [incognitoView setWantsLayer:YES]; [incognitoView setAutoresizingMask:NSViewMinXMargin | NSViewMinYMargin]; scoped_nsobject shadow([[NSShadow alloc] init]); - [shadow setShadowColor:[NSColor colorWithCalibratedWhite:0.0 alpha:0.5]]; - [shadow setShadowOffset:NSMakeSize(0, -1)]; + [shadow.get() setShadowColor:[NSColor colorWithCalibratedWhite:0.0 + alpha:0.5]]; + [shadow.get() setShadowOffset:NSMakeSize(0, -1)]; [shadow setShadowBlurRadius:2.0]; [incognitoView setShadow:shadow]; diff --git a/chrome/browser/cocoa/bubble_view.mm b/chrome/browser/cocoa/bubble_view.mm index 1a536c9..012e930 100644 --- a/chrome/browser/cocoa/bubble_view.mm +++ b/chrome/browser/cocoa/bubble_view.mm @@ -107,8 +107,8 @@ const float kWindowEdge = 0.7f; NSFont* textFont = [self font]; scoped_nsobject textShadow([[NSShadow alloc] init]); [textShadow setShadowBlurRadius:0.0f]; - [textShadow setShadowColor:[textColor gtm_legibleTextColor]]; - [textShadow setShadowOffset:NSMakeSize(0.0f, -1.0f)]; + [textShadow.get() setShadowColor:[textColor gtm_legibleTextColor]]; + [textShadow.get() setShadowOffset:NSMakeSize(0.0f, -1.0f)]; NSDictionary* textDict = [NSDictionary dictionaryWithObjectsAndKeys: textColor, NSForegroundColorAttributeName, diff --git a/chrome/browser/cocoa/download_item_cell.mm b/chrome/browser/cocoa/download_item_cell.mm index d5758ca..16b9edf 100644 --- a/chrome/browser/cocoa/download_item_cell.mm +++ b/chrome/browser/cocoa/download_item_cell.mm @@ -482,8 +482,8 @@ const int kCompleteAnimationDuration = 2.5; [context saveGraphicsState]; scoped_nsobject shadow([[NSShadow alloc] init]); - [shadow setShadowColor:[NSColor whiteColor]]; - [shadow setShadowOffset:NSMakeSize(0, -1)]; + [shadow.get() setShadowColor:[NSColor whiteColor]]; + [shadow.get() setShadowOffset:NSMakeSize(0, -1)]; [shadow setShadowBlurRadius:0.0]; [shadow set]; diff --git a/chrome/browser/cocoa/gradient_button_cell.mm b/chrome/browser/cocoa/gradient_button_cell.mm index 320567b..5a7a08a 100644 --- a/chrome/browser/cocoa/gradient_button_cell.mm +++ b/chrome/browser/cocoa/gradient_button_cell.mm @@ -319,8 +319,8 @@ static const NSTimeInterval kAnimationHideDuration = 0.4; scoped_nsobject shadow([[NSShadow alloc] init]); NSColor *shadowColor = [color gtm_legibleTextColor]; shadowColor = [shadowColor colorWithAlphaComponent:0.25]; - [shadow setShadowColor:shadowColor]; - [shadow setShadowOffset:NSMakeSize(0, -1.0)]; + [shadow.get() setShadowColor:shadowColor]; + [shadow.get() setShadowOffset:NSMakeSize(0, -1.0)]; [shadow setShadowBlurRadius:1.0]; [shadow set]; } diff --git a/chrome/browser/cocoa/tab_cell.mm b/chrome/browser/cocoa/tab_cell.mm index 6823e3b..6e2c22c 100644 --- a/chrome/browser/cocoa/tab_cell.mm +++ b/chrome/browser/cocoa/tab_cell.mm @@ -46,8 +46,8 @@ scoped_nsobject textShadow([[NSShadow alloc] init]); [textShadow setShadowBlurRadius:0.0f]; - [textShadow setShadowColor:[textColor gtm_legibleTextColor]]; - [textShadow setShadowOffset:NSMakeSize(0.0f, -1.0f)]; + [textShadow.get() setShadowColor:[textColor gtm_legibleTextColor]]; + [textShadow.get() setShadowOffset:NSMakeSize(0.0f, -1.0f)]; NSDictionary* attributes = [NSDictionary dictionaryWithObjectsAndKeys: -- cgit v1.1