Index: chrome/browser/ui/cocoa/tabs/tab_view.mm |
diff --git a/chrome/browser/ui/cocoa/tabs/tab_view.mm b/chrome/browser/ui/cocoa/tabs/tab_view.mm |
index 20e3e2173a4011ab528aa04c185f6045c9b310dd..06ee80125a5d030b5a9f4b6185cc7aa830e68eee 100644 |
--- a/chrome/browser/ui/cocoa/tabs/tab_view.mm |
+++ b/chrome/browser/ui/cocoa/tabs/tab_view.mm |
@@ -27,6 +27,12 @@ |
#include "ui/base/resource/resource_bundle.h" |
#include "ui/gfx/scoped_ns_graphics_context_save_gstate_mac.h" |
+namespace { |
+ |
+// The color of the icons in dark mode theme. |
+const SkColor kDarkModeIconColor = SkColorSetARGB(0xFF, 0xC4, 0xC4, 0xC4); |
+ |
+} // namespace |
// The amount of time in seconds during which each type of glow increases, holds |
// steady, and decreases, respectively. |
@@ -631,8 +637,23 @@ CGFloat LineWidthFromContext(CGContextRef context) { |
[self setNeedsDisplayInRect:[titleView_ frame]]; |
} |
-- (SkColor)closeButtonColor { |
- return [[controller_ closeButton] iconColor]; |
+- (SkColor)iconColor { |
+ if ([[self window] hasDarkTheme]) |
+ return kDarkModeIconColor; |
+ |
+ const ui::ThemeProvider* themeProvider = [[self window] themeProvider]; |
+ if (themeProvider) { |
+ bool useActiveTabTextColor = [self isActiveTab]; |
+ |
+ const SkColor titleColor = |
+ useActiveTabTextColor |
+ ? themeProvider->GetColor(ThemeProperties::COLOR_TAB_TEXT) |
+ : themeProvider->GetColor( |
+ ThemeProperties::COLOR_BACKGROUND_TAB_TEXT); |
+ return SkColorSetA(titleColor, 0xA0); |
+ } |
+ |
+ return tabs::kDefaultTabTextColor; |
} |
- (void)accessibilityOptionsDidChange:(id)ignored { |