listview: Use gtk_widget_add_css_class

No need to use the style context api for this anymore.
This commit is contained in:
Matthias Clasen 2020-06-03 17:36:52 -04:00
parent ce0dd650d7
commit 658e4c5357

View File

@ -994,9 +994,9 @@ gtk_list_view_set_show_separators (GtkListView *self,
self->show_separators = show_separators;
if (show_separators)
gtk_style_context_add_class (gtk_widget_get_style_context (GTK_WIDGET (self)), "separators");
gtk_widget_add_css_class (GTK_WIDGET (self), "separators");
else
gtk_style_context_remove_class (gtk_widget_get_style_context (GTK_WIDGET (self)), "separators");
gtk_widget_remove_css_class (GTK_WIDGET (self), "separators");
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_SHOW_SEPARATORS]);
}