summaryrefslogtreecommitdiffstats
path: root/chrome/browser/gtk/gtk_theme_provider.cc
diff options
context:
space:
mode:
authorerg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-14 19:08:55 +0000
committererg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-14 19:08:55 +0000
commit6c8bece66bb899bd9395a5d23d4442a344e74cc0 (patch)
treea497281cfb4248a7cd5311bbf1afd4f560ba3a35 /chrome/browser/gtk/gtk_theme_provider.cc
parent77dee9a13600fa16c5b5da67e8c8ec927f3563dc (diff)
downloadchromium_src-6c8bece66bb899bd9395a5d23d4442a344e74cc0.zip
chromium_src-6c8bece66bb899bd9395a5d23d4442a344e74cc0.tar.gz
chromium_src-6c8bece66bb899bd9395a5d23d4442a344e74cc0.tar.bz2
GTK: Match link colors.
- Realize our fake window in the GtkThemeProvider so we can access the style properties. - Make sure we don't generate the markup for a GtkChromeLinkButton until after it is realized. - Make sure GtkChromeLinkButton responds to system wide style theme changes. BUG=43850 TEST=Open up chrome to the NTP with an empty bookmark bar in GTK+ theme mode. The links on the NTP should match the GTK+ link color, and so should the import bookmark link in the bookmark bar. Change your GTK+ theme to one with a different link color. The NTP and import bookmark link should change to the new color. Review URL: http://codereview.chromium.org/2067007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47293 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/gtk/gtk_theme_provider.cc')
-rw-r--r--chrome/browser/gtk/gtk_theme_provider.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/chrome/browser/gtk/gtk_theme_provider.cc b/chrome/browser/gtk/gtk_theme_provider.cc
index 66fa0e5..d7d4b6b 100644
--- a/chrome/browser/gtk/gtk_theme_provider.cc
+++ b/chrome/browser/gtk/gtk_theme_provider.cc
@@ -143,8 +143,10 @@ GtkThemeProvider::GtkThemeProvider()
fake_entry_.Own(gtk_entry_new());
// Only realized widgets receive style-set notifications, which we need to
- // broadcast new theme images and colors.
+ // broadcast new theme images and colors. Only realized widgets have style
+ // properties, too, which we query for some colors.
gtk_widget_realize(fake_frame_);
+ gtk_widget_realize(fake_window_);
signals_.Connect(fake_frame_, "style-set", G_CALLBACK(&OnStyleSet), this);
}