diff options
author | Matthias Clasen <mclasen@redhat.com> | 2020-04-10 12:08:16 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2020-04-10 12:09:57 -0400 |
commit | 394ea32e93cab4253e7dd595f2a13824421f6d03 (patch) | |
tree | 7e6505f11199c5ebc47da50d249324bf09609a19 /tests/testoutsetshadowdrawing.c | |
parent | 2bd36d490b3a0c8138a2ad3aa246a0876ae0718b (diff) | |
download | gtk+-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 'tests/testoutsetshadowdrawing.c')
-rw-r--r-- | tests/testoutsetshadowdrawing.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/tests/testoutsetshadowdrawing.c b/tests/testoutsetshadowdrawing.c index 3b27b9c8a1..0966f42ddf 100644 --- a/tests/testoutsetshadowdrawing.c +++ b/tests/testoutsetshadowdrawing.c @@ -115,49 +115,49 @@ main (int argc, char **argv) w = gtk_button_new (); gtk_widget_set_valign (w, GTK_ALIGN_CENTER); - gtk_style_context_add_class (gtk_widget_get_style_context (w), "one"); + gtk_widget_add_css_class (w, "one"); gtk_container_add (GTK_CONTAINER (top), w); w = gtk_button_new (); gtk_widget_set_valign (w, GTK_ALIGN_CENTER); - gtk_style_context_add_class (gtk_widget_get_style_context (w), "two"); + gtk_widget_add_css_class (w, "two"); gtk_container_add (GTK_CONTAINER (top), w); w = gtk_button_new (); gtk_widget_set_valign (w, GTK_ALIGN_CENTER); - gtk_style_context_add_class (gtk_widget_get_style_context (w), "three"); + gtk_widget_add_css_class (w, "three"); gtk_widget_set_opacity (w, 0.7); gtk_container_add (GTK_CONTAINER (top), w); w = gtk_button_new (); gtk_widget_set_valign (w, GTK_ALIGN_CENTER); - gtk_style_context_add_class (gtk_widget_get_style_context (w), "four"); + gtk_widget_add_css_class (w, "four"); gtk_container_add (GTK_CONTAINER (top), w); w = gtk_button_new (); gtk_widget_set_valign (w, GTK_ALIGN_CENTER); - gtk_style_context_add_class (gtk_widget_get_style_context (w), "five"); + gtk_widget_add_css_class (w, "five"); gtk_container_add (GTK_CONTAINER (top), w); /* Bottom */ w = gtk_button_new (); gtk_widget_set_valign (w, GTK_ALIGN_CENTER); - gtk_style_context_add_class (gtk_widget_get_style_context (w), "b1"); + gtk_widget_add_css_class (w, "b1"); gtk_container_add (GTK_CONTAINER (bottom), w); /*w = gtk_button_new ();*/ /*gtk_widget_set_valign (w, GTK_ALIGN_CENTER);*/ - /*gtk_style_context_add_class (gtk_widget_get_style_context (w), "b2");*/ + /*gtk_widget_add_css_class (w, "b2");*/ /*gtk_container_add (GTK_CONTAINER (bottom), w);*/ /*w = gtk_button_new ();*/ /*gtk_widget_set_valign (w, GTK_ALIGN_CENTER);*/ - /*gtk_style_context_add_class (gtk_widget_get_style_context (w), "b3");*/ + /*gtk_widget_add_css_class (w, "b3");*/ /*gtk_container_add (GTK_CONTAINER (bottom), w);*/ /*w = gtk_button_new ();*/ /*gtk_widget_set_valign (w, GTK_ALIGN_CENTER);*/ - /*gtk_style_context_add_class (gtk_widget_get_style_context (w), "b4");*/ + /*gtk_widget_add_css_class (w, "b4");*/ /*gtk_container_add (GTK_CONTAINER (bottom), w);*/ gtk_container_add (GTK_CONTAINER (box), top); |