summaryrefslogtreecommitdiffstats
path: root/chrome/browser/cocoa/bookmark_bar_toolbar_view.mm
diff options
context:
space:
mode:
authoravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-23 18:36:12 +0000
committeravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-23 18:36:12 +0000
commit53ee4e180c8481c8054e5f8997376f1c79544b1f (patch)
tree0e87181b12dc6777aa26533cbc6716ce3409cff1 /chrome/browser/cocoa/bookmark_bar_toolbar_view.mm
parenta05c2ef0084fecfdfe297abeb2a6268b73abfce5 (diff)
downloadchromium_src-53ee4e180c8481c8054e5f8997376f1c79544b1f.zip
chromium_src-53ee4e180c8481c8054e5f8997376f1c79544b1f.tar.gz
chromium_src-53ee4e180c8481c8054e5f8997376f1c79544b1f.tar.bz2
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
Diffstat (limited to 'chrome/browser/cocoa/bookmark_bar_toolbar_view.mm')
-rw-r--r--chrome/browser/cocoa/bookmark_bar_toolbar_view.mm19
1 files changed, 5 insertions, 14 deletions
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];