diff options
author | Matthias Clasen <mclasen@redhat.com> | 2020-06-30 17:39:37 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2020-06-30 17:42:30 -0400 |
commit | c0e2d7c62f4b213dd7bb08546e2c3593c8129db9 (patch) | |
tree | 122eacf4f29d03b809d71b23e639203b3a4a79d7 /gtk/inspector | |
parent | e25c25fcb5878905ec761e1cad31ee7754c80432 (diff) | |
download | gtk+-c0e2d7c62f4b213dd7bb08546e2c3593c8129db9.tar.gz |
Drop unnecessary uses of gtk_style_context_add_class
We can use gtk_widget_add_css_class instead, most places.
Diffstat (limited to 'gtk/inspector')
-rw-r--r-- | gtk/inspector/actions.c | 6 | ||||
-rw-r--r-- | gtk/inspector/prop-list.c | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/gtk/inspector/actions.c b/gtk/inspector/actions.c index db432e20ad..f8ddc2d79c 100644 --- a/gtk/inspector/actions.c +++ b/gtk/inspector/actions.c @@ -134,7 +134,7 @@ setup_parameter_cb (GtkSignalListItemFactory *factory, label = gtk_label_new (NULL); gtk_label_set_xalign (GTK_LABEL (label), 0.5); gtk_list_item_set_child (list_item, label); - gtk_style_context_add_class (gtk_widget_get_style_context (label), "cell"); + gtk_widget_add_css_class (label, "cell"); } static void @@ -168,7 +168,7 @@ setup_state_cb (GtkSignalListItemFactory *factory, gtk_widget_set_margin_end (label, 5); gtk_label_set_xalign (GTK_LABEL (label), 0.0); gtk_list_item_set_child (list_item, label); - gtk_style_context_add_class (gtk_widget_get_style_context (label), "cell"); + gtk_widget_add_css_class (label, "cell"); } static void @@ -215,7 +215,7 @@ bind_changes_cb (GtkSignalListItemFactory *factory, name = action_holder_get_name (ACTION_HOLDER (item)); editor = gtk_inspector_action_editor_new (group, name, NULL); - gtk_style_context_add_class (gtk_widget_get_style_context (editor), "cell"); + gtk_widget_add_css_class (editor, "cell"); gtk_list_item_set_child (list_item, editor); } diff --git a/gtk/inspector/prop-list.c b/gtk/inspector/prop-list.c index 9ba203258f..0ca7343a84 100644 --- a/gtk/inspector/prop-list.c +++ b/gtk/inspector/prop-list.c @@ -314,7 +314,7 @@ setup_name_cb (GtkSignalListItemFactory *factory, label = gtk_label_new (NULL); gtk_label_set_xalign (GTK_LABEL (label), 0.0); gtk_list_item_set_child (list_item, label); - gtk_style_context_add_class (gtk_widget_get_style_context (label), "cell"); + gtk_widget_add_css_class (label, "cell"); } static void @@ -339,7 +339,7 @@ setup_type_cb (GtkSignalListItemFactory *factory, label = gtk_label_new (NULL); gtk_label_set_xalign (GTK_LABEL (label), 0.0); gtk_list_item_set_child (list_item, label); - gtk_style_context_add_class (gtk_widget_get_style_context (label), "cell"); + gtk_widget_add_css_class (label, "cell"); } static void @@ -369,7 +369,7 @@ setup_origin_cb (GtkSignalListItemFactory *factory, label = gtk_label_new (NULL); gtk_label_set_xalign (GTK_LABEL (label), 0.0); gtk_list_item_set_child (list_item, label); - gtk_style_context_add_class (gtk_widget_get_style_context (label), "cell"); + gtk_widget_add_css_class (label, "cell"); } static void |