[gtk/wip/otte/css: 5/17] tests: Use per-screen CSS providers
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/otte/css: 5/17] tests: Use per-screen CSS providers
- Date: Mon, 10 Feb 2020 03:01:52 +0000 (UTC)
commit 233f92835ff228e4f098231556a496d6274d0c78
Author: Benjamin Otte <otte redhat com>
Date: Sat Feb 8 03:32:21 2020 +0100
tests: Use per-screen CSS providers
tests/animated-revealing.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/tests/animated-revealing.c b/tests/animated-revealing.c
index 72e28459f4..15a8da41c0 100644
--- a/tests/animated-revealing.c
+++ b/tests/animated-revealing.c
@@ -55,15 +55,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);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]