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

Unified Diff: chrome/browser/gtk/gtk_util.cc

Issue 3198013: chromeos: Update autocomplete popup colors. (Closed)
Patch Set: add missing include Created 10 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/browser/gtk/gtk_util.cc
diff --git a/chrome/browser/gtk/gtk_util.cc b/chrome/browser/gtk/gtk_util.cc
index 3ed1ec1585614d0775d8159d9caeda43930ca921..1819a3c63f3e00809281a0396a3653af5b889b15 100644
--- a/chrome/browser/gtk/gtk_util.cc
+++ b/chrome/browser/gtk/gtk_util.cc
@@ -903,6 +903,26 @@ bool AddWindowAlphaChannel(GtkWidget* window) {
return rgba;
}
+void GetTextColors(GdkColor* normal_base,
+ GdkColor* selected_base,
+ GdkColor* normal_text,
+ GdkColor* selected_text) {
+ GtkWidget* fake_entry = gtk_entry_new();
+ GtkStyle* style = gtk_rc_get_style(fake_entry);
+
+ if (normal_base)
+ *normal_base = style->base[GTK_STATE_NORMAL];
+ if (selected_base)
+ *selected_base = style->base[GTK_STATE_SELECTED];
+ if (normal_text)
+ *normal_text = style->text[GTK_STATE_NORMAL];
+ if (selected_text)
+ *selected_text = style->text[GTK_STATE_SELECTED];
+
+ g_object_ref_sink(fake_entry);
+ g_object_unref(fake_entry);
+}
+
#if defined(OS_CHROMEOS)
GtkWindow* GetDialogTransientParent(GtkWindow* dialog) {
« no previous file with comments | « chrome/browser/gtk/gtk_util.h ('k') | chrome/browser/views/autocomplete/autocomplete_popup_contents_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698