Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3774)

Unified Diff: chrome/browser/ui/cocoa/tabs/tab_strip_view.mm

Issue 2087893002: [cocoa] increase tab strip contrast in "Increase Contrast" mode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix 10.9 detection & themeless windows Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/cocoa/download/background_theme.mm ('k') | chrome/browser/ui/cocoa/tabs/tab_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 8334d31dd830815a074bd3be78df351dac30b8f8..8006f5f7b96f16b62ba3961b703195e701f2c659 100644
--- a/chrome/browser/ui/cocoa/tabs/tab_strip_view.mm
+++ b/chrome/browser/ui/cocoa/tabs/tab_strip_view.mm
@@ -83,6 +83,7 @@
return;
}
+ NSColor* strokeColor;
if (themeProvider->HasCustomImage(IDR_THEME_TOOLBAR) ||
themeProvider->HasCustomColor(ThemeProperties::COLOR_TOOLBAR)) {
// First draw the toolbar bitmap, so that theme colors can shine through.
@@ -96,15 +97,21 @@
// which helped dark toolbars stand out from dark frames. Lay down a thin
// highlight in MD also.
if ([window isMainWindow]) {
- [themeProvider->GetNSColor(
- ThemeProperties::COLOR_TOOLBAR_STROKE_THEME) set];
+ strokeColor = themeProvider->GetNSColor(
+ ThemeProperties::COLOR_TOOLBAR_STROKE_THEME);
} else {
- [themeProvider->GetNSColor(
- ThemeProperties::COLOR_TOOLBAR_STROKE_THEME_INACTIVE) set];
+ strokeColor = themeProvider->GetNSColor(
+ ThemeProperties::COLOR_TOOLBAR_STROKE_THEME_INACTIVE);
}
} else {
- [themeProvider->GetNSColor(ThemeProperties::COLOR_TOOLBAR_STROKE) set];
+ strokeColor =
+ themeProvider->GetNSColor(ThemeProperties::COLOR_TOOLBAR_STROKE);
}
+
+ if (themeProvider->ShouldIncreaseContrast())
+ strokeColor = [strokeColor colorWithAlphaComponent:100];
+ [strokeColor set];
+
NSRect borderRect = NSMakeRect(0.0, 0.0, self.bounds.size.width,
[self cr_lineWidth]);
NSRectFillUsingOperation(NSIntersectionRect(dirtyRect, borderRect),
« no previous file with comments | « chrome/browser/ui/cocoa/download/background_theme.mm ('k') | chrome/browser/ui/cocoa/tabs/tab_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698