diff options
author | Benjamin Otte <otte@redhat.com> | 2020-02-08 03:32:21 +0100 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2022-10-09 10:13:10 -0400 |
commit | ed83272f35e77c0aeeb863c07a671e228e02c773 (patch) | |
tree | 5fe68d8e35f89c622ab2c86fe5a62fee97736862 /tests | |
parent | 20b49e7c34d1f865674c990124dd259f5c47b164 (diff) | |
download | gtk+-ed83272f35e77c0aeeb863c07a671e228e02c773.tar.gz |
tests: Use per-screen CSS providers
Diffstat (limited to 'tests')
-rw-r--r-- | tests/animated-revealing.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/animated-revealing.c b/tests/animated-revealing.c index 040e2c3e34..5e5f666a53 100644 --- a/tests/animated-revealing.c +++ b/tests/animated-revealing.c @@ -67,15 +67,15 @@ main(int argc, char **argv) cssprovider = gtk_css_provider_new (); gtk_css_provider_load_from_data (cssprovider, "* { padding: 2px; text-shadow: 5px 5px 2px grey; }", -1); + gtk_style_context_add_provider_for_display (gdk_display_get_default (), + GTK_STYLE_PROVIDER (cssprovider), + GTK_STYLE_PROVIDER_PRIORITY_APPLICATION); for (x = 0; x < 10; x++) { for (y = 0; y < 20; y++) { widget = gtk_label_new ("Hello World"); - gtk_style_context_add_provider (gtk_widget_get_style_context (widget), - GTK_STYLE_PROVIDER (cssprovider), - GTK_STYLE_PROVIDER_PRIORITY_APPLICATION); gtk_grid_attach (GTK_GRID (grid), widget, x, y, 1, 1); } } |