From 76184522f25caab6b741c6872a965c2869c12d92 Mon Sep 17 00:00:00 2001 From: "tc@google.com" Date: Fri, 10 Jul 2009 19:06:29 +0000 Subject: Add button tinting to the toolbar buttons. Make CustomDrawButtonBase aware of the ThemeProvider. If the theme changes, we reload new pixbufs from the ThemeProvider. This breaks RTL of the toolbar buttons, I'll add that back in a follow up change to BrowserThemeProvider. BUG=15506 TEST=Change themes or set the GTK+ theme. The star button and go button should be tinted according to the theme (other buttons as well if not using GTK+ buttons). Review URL: http://codereview.chromium.org/149432 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20396 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/gtk/toolbar_star_toggle_gtk.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'chrome/browser/gtk/toolbar_star_toggle_gtk.cc') diff --git a/chrome/browser/gtk/toolbar_star_toggle_gtk.cc b/chrome/browser/gtk/toolbar_star_toggle_gtk.cc index 77c5732..2692df7 100644 --- a/chrome/browser/gtk/toolbar_star_toggle_gtk.cc +++ b/chrome/browser/gtk/toolbar_star_toggle_gtk.cc @@ -8,14 +8,17 @@ #include "base/gfx/rect.h" #include "chrome/browser/gtk/bookmark_bubble_gtk.h" #include "chrome/browser/gtk/browser_toolbar_gtk.h" +#include "chrome/browser/profile.h" #include "grit/theme_resources.h" ToolbarStarToggleGtk::ToolbarStarToggleGtk(BrowserToolbarGtk* host) : host_(host), widget_(gtk_button_new()), is_starred_(false), - unstarred_(IDR_STAR, IDR_STAR_P, IDR_STAR_H, IDR_STAR_D), - starred_(IDR_STARRED, IDR_STARRED_P, IDR_STARRED_H, 0) { + unstarred_(host->profile()->GetThemeProvider(), IDR_STAR, IDR_STAR_P, + IDR_STAR_H, IDR_STAR_D), + starred_(host->profile()->GetThemeProvider(), IDR_STARRED, IDR_STARRED_P, + IDR_STARRED_H, 0) { gtk_widget_set_size_request(widget_.get(), gdk_pixbuf_get_width(unstarred_.pixbufs(0)), gdk_pixbuf_get_height(unstarred_.pixbufs(0))); -- cgit v1.1