summaryrefslogtreecommitdiffstats
path: root/chrome/browser/cocoa/browser_window_controller.mm
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/cocoa/browser_window_controller.mm')
-rw-r--r--chrome/browser/cocoa/browser_window_controller.mm50
1 files changed, 33 insertions, 17 deletions
diff --git a/chrome/browser/cocoa/browser_window_controller.mm b/chrome/browser/cocoa/browser_window_controller.mm
index 03c6146..33e5b6b 100644
--- a/chrome/browser/cocoa/browser_window_controller.mm
+++ b/chrome/browser/cocoa/browser_window_controller.mm
@@ -96,6 +96,7 @@ willPositionSheet:(NSWindow*)sheet
// Repositions the windows subviews.
- (void)layoutSubviews;
+
@end
@@ -927,8 +928,6 @@ willPositionSheet:(NSWindow*)sheet
- (void)userChangedTheme {
[self setTheme];
[self applyTheme];
-
- [tabStripController_ userChangedTheme];
}
- (GTMTheme *)gtm_themeForWindow:(NSWindow*)window {
@@ -1133,6 +1132,7 @@ willPositionSheet:(NSWindow*)sheet
[theme_ backgroundPatternColorForStyle:GTMThemeStyleWindow
state:[[self window] isMainWindow]];
[[self window] setBackgroundColor:color];
+ [tabStripController_ applyTheme];
}
// Private method to layout browser window subviews. Positions the toolbar and
@@ -1229,36 +1229,45 @@ willPositionSheet:(NSWindow*)sheet
[theme setValue:frameImage
forAttribute:@"backgroundImage"
style:GTMThemeStyleWindow
- state:YES];
+ state:GTMThemeStateActiveWindow];
- NSColor* tabTextColor = [NSColor blackColor];
+ NSColor* tabTextColor =
+ provider->GetNSColor(BrowserThemeProvider::COLOR_TAB_TEXT);
[theme setValue:tabTextColor
forAttribute:@"textColor"
style:GTMThemeStyleToolBar
- state:YES];
+ state:GTMThemeStateActiveWindow];
- NSColor* tabInactiveTextColor = [NSColor grayColor];
+ NSColor* tabInactiveTextColor =
+ provider->GetNSColor(BrowserThemeProvider::COLOR_BACKGROUND_TAB_TEXT);
[theme setValue:tabInactiveTextColor
forAttribute:@"textColor"
- style:GTMThemeStyleToolBar
- state:NO];
+ style:GTMThemeStyleTabBarDeselected
+ state:GTMThemeStateActiveWindow];
- NSColor* bookmarkBarTextColor = [NSColor blackColor];
+ NSColor* bookmarkBarTextColor =
+ provider->GetNSColor(BrowserThemeProvider::COLOR_BOOKMARK_TEXT);
[theme setValue:bookmarkBarTextColor
forAttribute:@"textColor"
style:GTMThemeStyleBookmarksBarButton
- state:YES];
+ state:GTMThemeStateActiveWindow];
[theme setValue:frameInactiveImage
forAttribute:@"backgroundImage"
style:GTMThemeStyleWindow
- state:NO];
+ state:0];
NSImage* toolbarImage = provider->GetNSImageNamed(IDR_THEME_TOOLBAR);
[theme setValue:toolbarImage
forAttribute:@"backgroundImage"
style:GTMThemeStyleToolBar
- state:YES];
+ state:GTMThemeStateActiveWindow];
+ NSImage* toolbarBackgroundImage =
+ provider->GetNSImageNamed(IDR_THEME_TAB_BACKGROUND);
+ [theme setValue:toolbarBackgroundImage
+ forAttribute:@"backgroundImage"
+ style:GTMThemeStyleTabBarDeselected
+ state:GTMThemeStateActiveWindow];
NSImage* toolbarButtonImage =
provider->GetNSImageNamed(IDR_THEME_BUTTON_BACKGROUND);
@@ -1266,7 +1275,7 @@ willPositionSheet:(NSWindow*)sheet
[theme setValue:toolbarButtonImage
forAttribute:@"backgroundImage"
style:GTMThemeStyleToolBarButton
- state:YES];
+ state:GTMThemeStateActiveWindow];
} else {
NSColor* startColor = [NSColor colorWithCalibratedWhite:1.0 alpha:0.0];
NSColor* endColor = [NSColor colorWithCalibratedWhite:1.0 alpha:0.3];
@@ -1277,12 +1286,12 @@ willPositionSheet:(NSWindow*)sheet
[theme setValue:gradient
forAttribute:@"gradient"
style:GTMThemeStyleToolBarButton
- state:YES];
+ state:GTMThemeStateActiveWindow];
[theme setValue:gradient
forAttribute:@"gradient"
style:GTMThemeStyleToolBarButton
- state:NO];
+ state:GTMThemeStateActiveWindow];
}
NSColor* toolbarButtonIconColor =
@@ -1290,13 +1299,20 @@ willPositionSheet:(NSWindow*)sheet
[theme setValue:toolbarButtonIconColor
forAttribute:@"iconColor"
style:GTMThemeStyleToolBarButton
- state:YES];
+ state:GTMThemeStateActiveWindow];
NSColor* toolbarButtonBorderColor = toolbarButtonIconColor;
[theme setValue:toolbarButtonBorderColor
forAttribute:@"borderColor"
style:GTMThemeStyleToolBar
- state:YES];
+ state:GTMThemeStateActiveWindow];
+
+ NSColor* toolbarBackgroundColor =
+ provider->GetNSColor(BrowserThemeProvider::COLOR_TOOLBAR);
+ [theme setValue:toolbarBackgroundColor
+ forAttribute:@"backgroundColor"
+ style:GTMThemeStyleToolBar
+ state:GTMThemeStateActiveWindow];
return theme;
}