Use gtk_widget_add/remove_css_class() where possible

This makes the code simpler and more idiomatic to GTK 4.
This commit is contained in:
Adrien Plazas
2022-05-10 13:01:25 +02:00
parent 2fd20f72a8
commit aecfebcc9d
9 changed files with 12 additions and 24 deletions
+1 -1
View File
@@ -88,7 +88,7 @@ add_grid_row (GcalImportFileRow *self,
"ellipsize", PANGO_ELLIPSIZE_END,
"max-width-chars", 40,
NULL);
gtk_style_context_add_class (gtk_widget_get_style_context (title_label), "dim-label");
gtk_widget_add_css_class (title_label, "dim-label");
gtk_grid_attach (grid, title_label, 0, row, 1, 1);
gtk_size_group_add_widget (self->title_sizegroup, title_label);