widget: Create style context using regular API

This commit is contained in:
Benjamin Otte
2012-03-18 14:02:58 +01:00
parent 7204724c9f
commit 1ca8098543

View File

@ -14115,12 +14115,11 @@ gtk_widget_get_style_context (GtkWidget *widget)
{
GdkScreen *screen;
priv->context = g_object_new (GTK_TYPE_STYLE_CONTEXT,
"direction", gtk_widget_get_direction (widget),
NULL);
priv->context = gtk_style_context_new ();
gtk_style_context_set_direction (priv->context, gtk_widget_get_direction (widget));
screen = gtk_widget_get_screen (widget);
if (screen)
gtk_style_context_set_screen (priv->context, screen);