From: Your Name Date: Tue, 8 Dec 2020 12:17:38 +0000 (+0000) Subject: Added css.c X-Git-Url: https://git.rkrishnan.org/pf/vdrive/simplejson//%22?a=commitdiff_plain;h=46502e619ac32afe080d848e7bccc540c776be84;p=pihpsdr.git Added css.c --- diff --git a/css.c b/css.c new file mode 100644 index 0000000..c8b9ae3 --- /dev/null +++ b/css.c @@ -0,0 +1,26 @@ +#include + +char *css= +" #small {\n" +" padding: 0;\n" +" font-family: Sans;\n" +" font-size: 12px;\n" +" }\n" +; + +void load_css() { + GtkCssProvider *provider; + GdkDisplay *display; + GdkScreen *screen; + + g_print("%s\n",__FUNCTION__); + provider = gtk_css_provider_new (); + display = gdk_display_get_default (); + screen = gdk_display_get_default_screen (display); + gtk_style_context_add_provider_for_screen (screen, + GTK_STYLE_PROVIDER(provider), + GTK_STYLE_PROVIDER_PRIORITY_APPLICATION); + + gtk_css_provider_load_from_data(provider, css, -1, NULL); + g_object_unref (provider); +}