Commit d31f3e57 authored by Marco Brito's avatar Marco Brito Committed by Matthias Clasen

Add class toolbar before the style context is created for the widget.

The call to gtk_button_set_relief() in gtk_toolbar_init() indirectly
used the style context of the half-created widget, before we had a
chance to add the "toolbar" style class to it.

Reorder gtk_toolbar_init() to ensure that the proper style class is
set first.

https://bugzilla.gnome.org/show_bug.cgi?id=719595
parent cc3c7370
......@@ -678,6 +678,9 @@ gtk_toolbar_init (GtkToolbar *toolbar)
toolbar->priv = gtk_toolbar_get_instance_private (toolbar);
priv = toolbar->priv;
context = gtk_widget_get_style_context (GTK_WIDGET (toolbar));
gtk_style_context_add_class (context, GTK_STYLE_CLASS_TOOLBAR);
gtk_widget_set_can_focus (GTK_WIDGET (toolbar), FALSE);
gtk_widget_set_has_window (GTK_WIDGET (toolbar), FALSE);
......@@ -711,9 +714,6 @@ gtk_toolbar_init (GtkToolbar *toolbar)
priv->max_homogeneous_pixels = -1;
priv->timer = g_timer_new ();
context = gtk_widget_get_style_context (GTK_WIDGET (toolbar));
gtk_style_context_add_class (context, GTK_STYLE_CLASS_TOOLBAR);
}
static void
......
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