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

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

Issue 165499: Updates to clean up default theme and add hover states (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 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
Index: chrome/browser/cocoa/browser_window_controller.mm
===================================================================
--- chrome/browser/cocoa/browser_window_controller.mm (revision 24798)
+++ chrome/browser/cocoa/browser_window_controller.mm (working copy)
@@ -96,6 +96,7 @@
// Repositions the windows subviews.
- (void)layoutSubviews;
+
@end
@@ -927,8 +928,6 @@
- (void)userChangedTheme {
[self setTheme];
[self applyTheme];
-
- [tabStripController_ userChangedTheme];
}
- (GTMTheme *)gtm_themeForWindow:(NSWindow*)window {
@@ -1133,6 +1132,7 @@
[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 @@
[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 @@
[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 @@
[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,14 +1299,21 @@
[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;
}
@end
« no previous file with comments | « chrome/browser/cocoa/bookmark_bar_controller.mm ('k') | chrome/browser/cocoa/browser_window_controller_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698