From ef300036626086e2ea520cd36d7926a91591918f Mon Sep 17 00:00:00 2001 From: "estade@chromium.org" Date: Wed, 2 Dec 2009 21:01:57 +0000 Subject: Gtk: theme certain close buttons: - download shelf - find bar - blocked popup container Notably, don't theme the infobar close button. In a follow up patch, I will fix the findbar and blocked popup container of Windows. BUG=29101 Review URL: http://codereview.chromium.org/454024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33600 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/gtk/blocked_popup_container_view_gtk.cc | 7 +++++++ chrome/browser/gtk/download_shelf_gtk.cc | 6 ++++++ chrome/browser/gtk/find_bar_gtk.cc | 6 ++++++ 3 files changed, 19 insertions(+) diff --git a/chrome/browser/gtk/blocked_popup_container_view_gtk.cc b/chrome/browser/gtk/blocked_popup_container_view_gtk.cc index 51eead3..d5341a7 100644 --- a/chrome/browser/gtk/blocked_popup_container_view_gtk.cc +++ b/chrome/browser/gtk/blocked_popup_container_view_gtk.cc @@ -117,6 +117,13 @@ void BlockedPopupContainerViewGtk::Observe(NotificationType type, GdkColor color = theme_provider_->GetGdkColor( BrowserThemeProvider::COLOR_BOOKMARK_TEXT); gtk_util::SetLabelColor(label, &color); + + + ResourceBundle& rb = ResourceBundle::GetSharedInstance(); + close_button_->SetBackground( + theme_provider_->GetColor(BrowserThemeProvider::COLOR_TAB_TEXT), + rb.GetBitmapNamed(IDR_CLOSE_BAR), + rb.GetBitmapNamed(IDR_CLOSE_BAR_MASK)); } GdkColor color = theme_provider_->GetBorderColor(); diff --git a/chrome/browser/gtk/download_shelf_gtk.cc b/chrome/browser/gtk/download_shelf_gtk.cc index 1e13892..8601855 100644 --- a/chrome/browser/gtk/download_shelf_gtk.cc +++ b/chrome/browser/gtk/download_shelf_gtk.cc @@ -207,6 +207,12 @@ void DownloadShelfGtk::Observe(NotificationType type, gtk_chrome_link_button_set_normal_color( GTK_CHROME_LINK_BUTTON(link_button_), use_default_color ? NULL : &bookmark_color); + + ResourceBundle& rb = ResourceBundle::GetSharedInstance(); + close_button_->SetBackground( + theme_provider_->GetColor(BrowserThemeProvider::COLOR_TAB_TEXT), + rb.GetBitmapNamed(IDR_CLOSE_BAR), + rb.GetBitmapNamed(IDR_CLOSE_BAR_MASK)); } } diff --git a/chrome/browser/gtk/find_bar_gtk.cc b/chrome/browser/gtk/find_bar_gtk.cc index 86ff2f7..54b99aa 100644 --- a/chrome/browser/gtk/find_bar_gtk.cc +++ b/chrome/browser/gtk/find_bar_gtk.cc @@ -502,6 +502,12 @@ void FindBarGtk::Observe(NotificationType type, gtk_widget_set_app_paintable(border_bin_, FALSE); gtk_misc_set_alignment(GTK_MISC(match_count_label_), 0.5, 1.0); + + ResourceBundle& rb = ResourceBundle::GetSharedInstance(); + close_button_->SetBackground( + theme_provider_->GetColor(BrowserThemeProvider::COLOR_TAB_TEXT), + rb.GetBitmapNamed(IDR_CLOSE_BAR), + rb.GetBitmapNamed(IDR_CLOSE_BAR_MASK)); } UpdateMatchLabelAppearance(match_label_failure_); -- cgit v1.1