Chromium Code Reviews| 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 e3ccd72c0400f6ebe53a3b3997ee416a560f2524..c2951e43063023eff957df07941a2126b7312e47 100644 |
| --- a/chrome/browser/ui/cocoa/tabs/tab_strip_view.mm |
| +++ b/chrome/browser/ui/cocoa/tabs/tab_strip_view.mm |
| @@ -64,8 +64,8 @@ |
| // Themes don't have an inactive image so only look for one if there's no |
| // theme. |
| - bool active = [[self window] isKeyWindow] || [[self window] isMainWindow] || |
| - !themeProvider->UsingDefaultTheme(); |
| + bool active = |
| + [[self window] isMainWindow] || !themeProvider->UsingDefaultTheme(); |
|
Andre
2015/02/03 19:20:37
I discussed this with Robert yesterday.
The browse
|
| int resource_id = active ? IDR_THEME_TOOLBAR : IDR_THEME_TOOLBAR_INACTIVE; |
| [themeProvider->GetNSImageColorNamed(resource_id) set]; |
| NSRectFill( |
| @@ -81,7 +81,7 @@ |
| borderRect.size.height = [image size].height; |
| borderRect.origin.y = 0; |
| - BOOL focused = [[self window] isKeyWindow] || [[self window] isMainWindow]; |
| + BOOL focused = [[self window] isMainWindow]; |
| NSDrawThreePartImage(borderRect, nil, image, nil, /*vertical=*/ NO, |
| NSCompositeSourceOver, |
| focused ? 1.0 : tabs::kImageNoFocusAlpha, |
| @@ -296,4 +296,14 @@ |
| controller_ = controller; |
| } |
| +// ThemedWindowDrawing implementation. |
| + |
| +- (void)windowDidChangeTheme { |
| + [self setNeedsDisplay:YES]; |
| +} |
| + |
| +- (void)windowDidChangeActive { |
| + [self setNeedsDisplay:YES]; |
| +} |
| + |
| @end |