summaryrefslogtreecommitdiffstats
path: root/chrome/browser/cocoa/browser_window_controller.mm
diff options
context:
space:
mode:
authoravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-26 20:20:51 +0000
committeravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-26 20:20:51 +0000
commit71f4c1dc80499f254b9f06e510002ff3b43a87e0 (patch)
tree6eeb8693a47e7990e5bb3995812e2fa641bcda09 /chrome/browser/cocoa/browser_window_controller.mm
parent7cc6c0ba59df63f9f084f8cdfc695fa7b4ae1823 (diff)
downloadchromium_src-71f4c1dc80499f254b9f06e510002ff3b43a87e0.zip
chromium_src-71f4c1dc80499f254b9f06e510002ff3b43a87e0.tar.gz
chromium_src-71f4c1dc80499f254b9f06e510002ff3b43a87e0.tar.bz2
Updates to clean up default theme and add hover states.
Path by Cole. BUG=http://crbug.com/18573;http://crbug.com/18574;http://crbug.com/18360;http://crbug.com/18438 TEST=none Review URL: http://codereview.chromium.org/165499 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24512 0039d316-1c4b-4281-b951-d872f2087c98
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;
}