summaryrefslogtreecommitdiffstats
path: root/chrome/browser/cocoa/bookmark_bar_view.mm
diff options
context:
space:
mode:
authorjrg@chromium.org <jrg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-20 22:33:14 +0000
committerjrg@chromium.org <jrg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-20 22:33:14 +0000
commit60123ad4520e5561950d5cc949e1a0451abd4dcc (patch)
tree68035b12a4d0b9b975e87b871c0bd95f083391b0 /chrome/browser/cocoa/bookmark_bar_view.mm
parent6e948a40ee9134cfba48eb6d007378a4f4c11a8d (diff)
downloadchromium_src-60123ad4520e5561950d5cc949e1a0451abd4dcc.zip
chromium_src-60123ad4520e5561950d5cc949e1a0451abd4dcc.tar.gz
chromium_src-60123ad4520e5561950d5cc949e1a0451abd4dcc.tar.bz2
Apply theme color to bookmark button text.
BUG=http://crbug.com/17608 TEST=Add some bookmarks (you must use both folders and marks). Apply a theme and make sure theme color applies bookmark button text for all buttons (including "Other bookmarks"). Create new window and make sure bookmark buttons still fine in new window. Quit and restart Chrome. Make sure theme color still applied to bookmark button text in the same way as before quitting (e.g. same color and still applies to all). Change theme 1 more time and verify color. Review URL: http://codereview.chromium.org/424004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32690 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/bookmark_bar_view.mm')
-rw-r--r--chrome/browser/cocoa/bookmark_bar_view.mm9
1 files changed, 6 insertions, 3 deletions
diff --git a/chrome/browser/cocoa/bookmark_bar_view.mm b/chrome/browser/cocoa/bookmark_bar_view.mm
index e6976af..31d167f 100644
--- a/chrome/browser/cocoa/bookmark_bar_view.mm
+++ b/chrome/browser/cocoa/bookmark_bar_view.mm
@@ -40,9 +40,12 @@
[self registerForDraggedTypes:types];
}
-- (void)viewDidMoveToWindow {
- if ([self window])
- [self updateTheme:[self gtm_theme]];
+// We need the theme to color the bookmark buttons properly. But our
+// controller desn't have access to it until it's placed in the view
+// hierarchy. This is the spot where we close the loop.
+- (void)viewWillMoveToWindow:(NSWindow*)window {
+ [self updateTheme:[window gtm_theme]];
+ [controller_ updateTheme:[window gtm_theme]];
}
// Called after the current theme has changed.