summaryrefslogtreecommitdiff
path: root/tests/testoverlaystyleclass.c
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2023-05-16 21:22:01 +0100
committerMatthias Clasen <mclasen@redhat.com>2023-05-16 16:59:05 -0400
commit1ad4c04b2a17dd84b3929a6c70b2712c31dff99b (patch)
treee944e538dd9f882f6de626ee24d7082f279875ab /tests/testoverlaystyleclass.c
parent0bbe68db0be9228ba996906e9d746488231cb1d2 (diff)
downloadgtk+-1ad4c04b2a17dd84b3929a6c70b2712c31dff99b.tar.gz
Replace deprecated CSS loading API
Use gtk_css_provider_load_from_string() when loading CSS from C strings.
Diffstat (limited to 'tests/testoverlaystyleclass.c')
-rw-r--r--tests/testoverlaystyleclass.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/tests/testoverlaystyleclass.c b/tests/testoverlaystyleclass.c
index 747783972a..1c4e40ff43 100644
--- a/tests/testoverlaystyleclass.c
+++ b/tests/testoverlaystyleclass.c
@@ -22,7 +22,7 @@ overlay_get_child_position (GtkOverlay *overlay,
return TRUE;
}
-int
+int
main (int argc, char *argv[])
{
GtkWidget *win, *overlay, *grid, *main_child, *child, *label, *sw;
@@ -32,13 +32,12 @@ main (int argc, char *argv[])
gtk_init ();
provider = gtk_css_provider_new ();
- gtk_css_provider_load_from_data (provider,
- "label { border: 3px solid black; border-radius: 5px; padding: 2px; }"
- ".top { border-top-style: none; border-top-right-radius: 0px; border-top-left-radius: 0px; }"
- ".bottom { border-bottom-style: none; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px; }"
- ".left { border-left-style: none; border-top-left-radius: 0px; border-bottom-left-radius: 0px; }"
- ".right { border-right-style: none; border-top-right-radius: 0px; border-bottom-right-radius: 0px; }",
- -1);
+ gtk_css_provider_load_from_string (provider,
+ "label { border: 3px solid black; border-radius: 5px; padding: 2px; }"
+ ".top { border-top-style: none; border-top-right-radius: 0px; border-top-left-radius: 0px; }"
+ ".bottom { border-bottom-style: none; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px; }"
+ ".left { border-left-style: none; border-top-left-radius: 0px; border-bottom-left-radius: 0px; }"
+ ".right { border-right-style: none; border-top-right-radius: 0px; border-bottom-right-radius: 0px; }");
gtk_style_context_add_provider_for_display (gdk_display_get_default (),
GTK_STYLE_PROVIDER (provider),
GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);