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

Unified Diff: chrome/browser/cocoa/tab_view.mm

Issue 3140009: [Mac] Fix aesthetic issues with themes given the new TopChrome changes.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years, 4 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/cocoa/tab_strip_view.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/cocoa/tab_view.mm
===================================================================
--- chrome/browser/cocoa/tab_view.mm (revision 55783)
+++ chrome/browser/cocoa/tab_view.mm (working copy)
@@ -627,7 +627,8 @@
NSGraphicsContext* context = [NSGraphicsContext currentContext];
[context saveGraphicsState];
- ThemeProvider* themeProvider = [[self window] themeProvider];
+ BrowserThemeProvider* themeProvider =
+ static_cast<BrowserThemeProvider*>([[self window] themeProvider]);
[context setPatternPhase:[[self window] themePatternPhase]];
NSRect rect = [self bounds];
@@ -716,10 +717,14 @@
BOOL active = [[self window] isKeyWindow] || [[self window] isMainWindow];
CGFloat borderAlpha = selected ? (active ? 0.3 : 0.2) : 0.2;
NSColor* borderColor = [NSColor colorWithDeviceWhite:0.0 alpha:borderAlpha];
- NSColor* highlightColor = [NSColor colorWithCalibratedWhite:0.96 alpha:1.0];
+ NSColor* highlightColor = themeProvider ? themeProvider->GetNSColor(
+ themeProvider->UsingDefaultTheme() ?
+ BrowserThemeProvider::COLOR_TOOLBAR_BEZEL :
+ BrowserThemeProvider::COLOR_TOOLBAR, true) : nil;
- // Draw the top inner highlight within the currently selected tab.
- if (selected) {
+ // Draw the top inner highlight within the currently selected tab if using
+ // the default theme.
+ if (selected && themeProvider && themeProvider->UsingDefaultTheme()) {
NSAffineTransform* highlightTransform = [NSAffineTransform transform];
[highlightTransform translateXBy:1.0 yBy:-1.0];
scoped_nsobject<NSBezierPath> highlightPath([path copy]);
« no previous file with comments | « chrome/browser/cocoa/tab_strip_view.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698