[gtk+] spinbutton: fix style context path for internal buttons



commit 2d5fa7852864820422e01457f6405350d78e23fd
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Wed Sep 19 15:41:19 2012 -0400

    spinbutton: fix style context path for internal buttons
    
    We were adding one child too much to the style context path when
    generating it for the internal buttons, which in turn caused sibling
    selectors from the theme such as :first-child to apply to both buttons
    under certain circumstances. Spotted by Lapo Calamandrei.

 gtk/gtkspinbutton.c |   10 ++--------
 1 files changed, 2 insertions(+), 8 deletions(-)
---
diff --git a/gtk/gtkspinbutton.c b/gtk/gtkspinbutton.c
index 915f8ba..bc1e4a8 100644
--- a/gtk/gtkspinbutton.c
+++ b/gtk/gtkspinbutton.c
@@ -771,15 +771,9 @@ gtk_spin_button_panel_nthchildize_context (GtkSpinButton *spin_button,
   gtk_widget_path_iter_add_class (siblings_path, down_pos, GTK_STYLE_CLASS_SPINBUTTON);
 
   if (panel == priv->down_panel)
-    {
-      gtk_widget_path_append_with_siblings (path, siblings_path, up_pos);
-      gtk_widget_path_append_with_siblings (path, siblings_path, down_pos);
-    }
+    gtk_widget_path_append_with_siblings (path, siblings_path, down_pos);
   else
-    {
-      gtk_widget_path_append_with_siblings (path, siblings_path, down_pos);
-      gtk_widget_path_append_with_siblings (path, siblings_path, up_pos);
-    }
+    gtk_widget_path_append_with_siblings (path, siblings_path, up_pos);
 
   gtk_style_context_set_path (context, path);
   gtk_widget_path_unref (path);



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