summaryrefslogtreecommitdiff
path: root/demos/constraint-editor
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2020-04-10 12:08:16 -0400
committerMatthias Clasen <mclasen@redhat.com>2020-04-10 12:09:57 -0400
commit394ea32e93cab4253e7dd595f2a13824421f6d03 (patch)
tree7e6505f11199c5ebc47da50d249324bf09609a19 /demos/constraint-editor
parent2bd36d490b3a0c8138a2ad3aa246a0876ae0718b (diff)
downloadgtk+-394ea32e93cab4253e7dd595f2a13824421f6d03.tar.gz
Use gtk_widget_add/remove_css_class more
Replace most uses of gtk_style_context_add/remove_class by the new APIs. The only remaining uses of the old API are in save/restore situations.
Diffstat (limited to 'demos/constraint-editor')
-rw-r--r--demos/constraint-editor/constraint-view.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/demos/constraint-editor/constraint-view.c b/demos/constraint-editor/constraint-view.c
index 56d4703872..141a40327c 100644
--- a/demos/constraint-editor/constraint-view.c
+++ b/demos/constraint-editor/constraint-view.c
@@ -214,7 +214,7 @@ constraint_view_add_child (ConstraintView *view,
label = gtk_label_new (name);
frame = gtk_frame_new (NULL);
- gtk_style_context_add_class (gtk_widget_get_style_context (frame), "child");
+ gtk_widget_add_css_class (frame, "child");
gtk_widget_set_name (frame, name);
gtk_container_add (GTK_CONTAINER (frame), label);
gtk_widget_set_parent (frame, GTK_WIDGET (view));
@@ -257,7 +257,7 @@ constraint_view_add_guide (ConstraintView *view,
G_BINDING_DEFAULT);
frame = gtk_frame_new (NULL);
- gtk_style_context_add_class (gtk_widget_get_style_context (frame), "guide");
+ gtk_widget_add_css_class (frame, "guide");
g_object_set_data (G_OBJECT (frame), "internal", (char *)"yes");
gtk_container_add (GTK_CONTAINER (frame), label);
gtk_widget_insert_after (frame, GTK_WIDGET (view), NULL);