From 53ee4e180c8481c8054e5f8997376f1c79544b1f Mon Sep 17 00:00:00 2001 From: "avi@chromium.org" Date: Tue, 23 Feb 2010 18:36:12 +0000 Subject: Another pass at removal of GTMTheme. Also fixes unreadability of bookmark bar/status bubble in unthemed incognito mode. BUG=http://crbug.com/35554 ; http://crbug.com/29845 TEST=no visible change in normal mode; themed incognito windows should look ugly still but in a different way Review URL: http://codereview.chromium.org/650092 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39749 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/cocoa/bookmark_bar_toolbar_view.mm | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) (limited to 'chrome/browser/cocoa/bookmark_bar_toolbar_view.mm') diff --git a/chrome/browser/cocoa/bookmark_bar_toolbar_view.mm b/chrome/browser/cocoa/bookmark_bar_toolbar_view.mm index 39efab9..bf0d9fc 100644 --- a/chrome/browser/cocoa/bookmark_bar_toolbar_view.mm +++ b/chrome/browser/cocoa/bookmark_bar_toolbar_view.mm @@ -8,10 +8,10 @@ #include "app/theme_provider.h" #include "base/gfx/rect.h" #include "chrome/browser/browser_theme_provider.h" -#import "chrome/browser/cocoa/browser_window_controller.h" #import "chrome/browser/cocoa/bookmark_bar_constants.h" #import "chrome/browser/cocoa/bookmark_bar_controller.h" -#import "chrome/browser/cocoa/GTMTheme.h" +#import "chrome/browser/cocoa/browser_window_controller.h" +#import "chrome/browser/cocoa/themed_window.h" #include "chrome/browser/ntp_background_util.h" const CGFloat kBorderRadius = 3.0; @@ -89,15 +89,7 @@ const CGFloat kBorderRadius = 3.0; // Draw the rounded rectangle. NSColor* toolbarColor = - [[self gtm_theme] backgroundColorForStyle:GTMThemeStyleToolBar - state:GTMThemeStateActiveWindow]; - // workaround for default theme - // TODO(alcor) next GTM update return nil for background color if not set; - // http://crbug.com/25196 - if ([toolbarColor isEqual:[NSColor colorWithCalibratedWhite:0.5 alpha:1.0]]) - toolbarColor = nil; - if (!toolbarColor) - toolbarColor = [NSColor colorWithCalibratedWhite:0.9 alpha:1.0]; + themeProvider->GetNSColor(BrowserThemeProvider::COLOR_TOOLBAR, true); CGFloat alpha = morph * [toolbarColor alphaComponent]; [[toolbarColor colorWithAlphaComponent:alpha] set]; // Set with opacity. [border fill]; @@ -114,9 +106,8 @@ const CGFloat kBorderRadius = 3.0; [context restoreGraphicsState]; // Draw the border of the rounded rectangle. - NSColor* borderColor = - [[self gtm_theme] strokeColorForStyle:GTMThemeStyleToolBarButton - state:GTMThemeStateActiveWindow]; + NSColor* borderColor = themeProvider->GetNSColor( + BrowserThemeProvider::COLOR_TOOLBAR_BUTTON_STROKE, true); alpha = morph * [borderColor alphaComponent]; [[borderColor colorWithAlphaComponent:alpha] set]; // Set with opacity. [border stroke]; -- cgit v1.1