diff options
author | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-03 00:06:09 +0000 |
---|---|---|
committer | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-03 00:06:09 +0000 |
commit | d3ba7727bab47266a43ba17790be43eaf4c7961f (patch) | |
tree | b796080c822c41b935fde0b37806f64d961abb2d /chrome/common/gtk_util.cc | |
parent | 15730c45ebf0eb657ba30e19f643bfe1cf299ce7 (diff) | |
download | chromium_src-d3ba7727bab47266a43ba17790be43eaf4c7961f.zip chromium_src-d3ba7727bab47266a43ba17790be43eaf4c7961f.tar.gz chromium_src-d3ba7727bab47266a43ba17790be43eaf4c7961f.tar.bz2 |
Set the focus ring color to match the Gtk theme focus color.
BUG=8540
Review URL: http://codereview.chromium.org/173642
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25278 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/gtk_util.cc')
-rw-r--r-- | chrome/common/gtk_util.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/chrome/common/gtk_util.cc b/chrome/common/gtk_util.cc index 5446a3d..e026877 100644 --- a/chrome/common/gtk_util.cc +++ b/chrome/common/gtk_util.cc @@ -400,6 +400,15 @@ void InitRendererPrefsFromGtkSettings(RendererPreferences* prefs) { } } + static GtkWidget* fixed = gtk_fixed_new(); + GtkStyle* style = gtk_rc_get_style(fixed); + // base[SELECTED] seems more appropriate but in practice it is often too light + // to be easily visible. + GdkColor color = style->bg[GTK_STATE_SELECTED]; + prefs->focus_ring_color_r = color.red / 257; + prefs->focus_ring_color_g = color.green / 257; + prefs->focus_ring_color_b = color.blue / 257; + if (hint_style) g_free(hint_style); if (rgba_style) |