diff options
author | glen@chromium.org <glen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-03 18:19:15 +0000 |
---|---|---|
committer | glen@chromium.org <glen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-03 18:19:15 +0000 |
commit | 2f048d4875358357f7a067ced6eaf570d145fda7 (patch) | |
tree | 29eae896a20dceeff10d99c911922590c8a294b1 /chrome/browser/views | |
parent | 48fcc73051f66d6cb1bd729bc2061862e0c152da (diff) | |
download | chromium_src-2f048d4875358357f7a067ced6eaf570d145fda7.zip chromium_src-2f048d4875358357f7a067ced6eaf570d145fda7.tar.gz chromium_src-2f048d4875358357f7a067ced6eaf570d145fda7.tar.bz2 |
Theme our bookmark bar buttons.
BUG=12467
TEST=Apply a theme and verify that bookmark bar text colors changes.
Review URL: http://codereview.chromium.org/112092
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17500 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views')
-rw-r--r-- | chrome/browser/views/bookmark_bar_view.cc | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/chrome/browser/views/bookmark_bar_view.cc b/chrome/browser/views/bookmark_bar_view.cc index f151625..488a744 100644 --- a/chrome/browser/views/bookmark_bar_view.cc +++ b/chrome/browser/views/bookmark_bar_view.cc @@ -381,11 +381,10 @@ BookmarkBarView::BookmarkBarView(Profile* profile, Browser* browser) Init(); SetProfile(profile); - if (IsAlwaysShown()) { + if (IsAlwaysShown()) size_animation_->Reset(1); - } else { + else size_animation_->Reset(0); - } } BookmarkBarView::~BookmarkBarView() { @@ -935,6 +934,15 @@ void BookmarkBarView::Loaded(BookmarkModel* model) { // Create a button for each of the children on the bookmark bar. for (int i = 0; i < node->GetChildCount(); ++i) AddChildView(i, CreateBookmarkButton(node->GetChild(i))); + + // This button is normally created too early to get access to the theme + // provider, so we change its color here; this also makes color changes from + // profile swaps work. + if (GetThemeProvider()) { + other_bookmarked_button_->SetEnabledColor(GetThemeProvider()-> + GetColor(BrowserThemeProvider::COLOR_BOOKMARK_TEXT)); + } + other_bookmarked_button_->SetEnabled(true); Layout(); @@ -1248,6 +1256,9 @@ views::View* BookmarkBarView::CreateBookmarkButton(BookmarkNode* node) { void BookmarkBarView::ConfigureButton(BookmarkNode* node, views::TextButton* button) { button->SetText(node->GetTitle()); + DCHECK(GetThemeProvider()); + button->SetEnabledColor(GetThemeProvider()->GetColor( + BrowserThemeProvider::COLOR_BOOKMARK_TEXT)); button->ClearMaxTextSize(); button->SetContextMenuController(this); button->SetDragController(this); |