diff options
author | viettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-19 01:42:26 +0000 |
---|---|---|
committer | viettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-19 01:42:26 +0000 |
commit | 63200afe8ab14639b2d04fe08044ac1950dc3764 (patch) | |
tree | a41cec6b3224f22ef6144b68432f7298b8e9e183 | |
parent | 00f74d1b32468e308c0fa19adcb6a7636cec1b9a (diff) | |
download | chromium_src-63200afe8ab14639b2d04fe08044ac1950dc3764.zip chromium_src-63200afe8ab14639b2d04fe08044ac1950dc3764.tar.gz chromium_src-63200afe8ab14639b2d04fe08044ac1950dc3764.tar.bz2 |
Mac: Fix regression in NTP detached bookmark bar colours.
The regression was caused by r32425.
BUG=28203
TEST=Look at NTP detached bookmark bar: it should be medium-ish grey, not black (or is that dark grey)?
Review URL: http://codereview.chromium.org/406009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32461 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/cocoa/bookmark_bar_toolbar_view.mm | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/chrome/browser/cocoa/bookmark_bar_toolbar_view.mm b/chrome/browser/cocoa/bookmark_bar_toolbar_view.mm index 6ca3f54..b665a29 100644 --- a/chrome/browser/cocoa/bookmark_bar_toolbar_view.mm +++ b/chrome/browser/cocoa/bookmark_bar_toolbar_view.mm @@ -98,7 +98,8 @@ const CGFloat kBorderRadius = 3.0; toolbarColor = nil; if (!toolbarColor) toolbarColor = [NSColor colorWithCalibratedWhite:0.9 alpha:1.0]; - [[toolbarColor colorWithAlphaComponent:morph] set]; // Set with opacity. + CGFloat alpha = morph * [toolbarColor alphaComponent]; + [[toolbarColor colorWithAlphaComponent:alpha] set]; // Set with opacity. [border fill]; // Fade in/out the background. @@ -116,13 +117,16 @@ const CGFloat kBorderRadius = 3.0; NSColor* borderColor = [[self gtm_theme] strokeColorForStyle:GTMThemeStyleToolBarButton state:GTMThemeStateActiveWindow]; - [[borderColor colorWithAlphaComponent:morph] set]; // Set with opacity. + alpha = morph * [borderColor alphaComponent]; + [[borderColor colorWithAlphaComponent:alpha] set]; // Set with opacity. [border stroke]; // Fade in/out the divider. // TODO(viettrungluu): It's not obvious that this divider lines up exactly // with |BackgroundGradientView|'s (in fact, it probably doesn't). - [[[self strokeColor] colorWithAlphaComponent:(1 - morph)] set]; + NSColor* strokeColor = [self strokeColor]; + alpha = (1 - morph) * [strokeColor alphaComponent]; + [[strokeColor colorWithAlphaComponent:alpha] set]; NSBezierPath* divider = [NSBezierPath bezierPath]; NSPoint dividerStart = NSMakePoint(morph * bookmarks::kNTPBookmarkBarPadding + morph * 0.5, |