| Index: chrome/browser/ui/cocoa/tabs/tab_strip_view.mm
|
| diff --git a/chrome/browser/ui/cocoa/tabs/tab_strip_view.mm b/chrome/browser/ui/cocoa/tabs/tab_strip_view.mm
|
| index 35d3c091dd0151e93c9a03fedfbe569a39701302..0bc50071b4ace4e379ca0574bfd1ff0753e33245 100644
|
| --- a/chrome/browser/ui/cocoa/tabs/tab_strip_view.mm
|
| +++ b/chrome/browser/ui/cocoa/tabs/tab_strip_view.mm
|
| @@ -19,6 +19,10 @@
|
| #include "ui/base/l10n/l10n_util_mac.h"
|
| #include "ui/gfx/scoped_ns_graphics_context_save_gstate_mac.h"
|
|
|
| +// When the window doesn't have focus then we want to draw the button with a
|
| +// slightly lighter color. We do this by just reducing the alpha.
|
| +const CGFloat kImageNoFocusAlpha = 0.65;
|
| +
|
| @implementation TabStripView
|
|
|
| @synthesize dropArrowShown = dropArrowShown_;
|
| @@ -75,8 +79,10 @@
|
| borderRect.size.height = [image size].height;
|
| borderRect.origin.y = 0;
|
|
|
| - NSDrawThreePartImage(borderRect, nil, image, nil, /*vertical=*/NO,
|
| - NSCompositeSourceOver, 1.0, /*flipped=*/NO);
|
| + bool active = [[self window] isKeyWindow] || [[self window] isMainWindow];
|
| + NSDrawThreePartImage(borderRect, nil, image, nil, /*vertical=*/ NO,
|
| + NSCompositeSourceOver,
|
| + active ? 1.0 : kImageNoFocusAlpha, /*flipped=*/ NO);
|
| }
|
|
|
| - (void)drawRect:(NSRect)rect {
|
|
|