Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(97)

Unified Diff: chrome/common/gtk_util.cc

Issue 173642: Set the focus ring color to match the Gtk theme focus color. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: connect to notification Created 11 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/common/gtk_util.cc
===================================================================
--- chrome/common/gtk_util.cc (revision 25076)
+++ chrome/common/gtk_util.cc (working copy)
@@ -405,6 +405,15 @@
}
}
+ 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)

Powered by Google App Engine
This is Rietveld 408576698