Commit 2d5fa785 authored by Cosimo Cecchi's avatar Cosimo Cecchi

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.
parent 67e44e6a
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment