[epiphany/gnome-3-16] web-extension: fix color of form filler popup



commit 5bbb4bd994fab4d7b9083907e4b5f8335dcfb2b9
Author: Claudio Saavedra <csaavedra igalia com>
Date:   Fri Jun 12 15:10:59 2015 +0300

    web-extension: fix color of form filler popup
    
    Style context calls were missing setting the state previously
    as required by GtkStyleContext.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=750842

 embed/web-extension/ephy-web-extension.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/embed/web-extension/ephy-web-extension.c b/embed/web-extension/ephy-web-extension.c
index 179bc5d..17fd4f3 100644
--- a/embed/web-extension/ephy-web-extension.c
+++ b/embed/web-extension/ephy-web-extension.c
@@ -513,6 +513,8 @@ static char*
 get_selected_bgcolor (void)
 {
   GdkRGBA color;
+  gtk_style_context_set_state (get_entry_style_context (),
+                               GTK_STATE_FLAG_SELECTED);
   gtk_style_context_get_background_color (get_entry_style_context (),
                                           GTK_STATE_FLAG_SELECTED,
                                           &color);
@@ -523,6 +525,8 @@ static char*
 get_selected_fgcolor (void)
 {
   GdkRGBA color;
+  gtk_style_context_set_state (get_entry_style_context (),
+                               GTK_STATE_FLAG_SELECTED);
   gtk_style_context_get_color (get_entry_style_context (),
                                GTK_STATE_FLAG_SELECTED,
                                &color);
@@ -533,6 +537,8 @@ static char*
 get_bgcolor (void)
 {
   GdkRGBA color;
+  gtk_style_context_set_state (get_entry_style_context (),
+                               GTK_STATE_FLAG_NORMAL);
   gtk_style_context_get_background_color (get_entry_style_context (),
                                           GTK_STATE_FLAG_NORMAL,
                                           &color);
@@ -543,6 +549,8 @@ static char*
 get_fgcolor (void)
 {
   GdkRGBA color;
+  gtk_style_context_set_state (get_entry_style_context (),
+                               GTK_STATE_FLAG_NORMAL);
   gtk_style_context_get_color (get_entry_style_context (),
                                GTK_STATE_FLAG_NORMAL,
                                &color);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]