]> git.rkrishnan.org Git - pihpsdr.git/commitdiff
Added css.c
authorYour Name <john.d.melton@googlemail.com>
Tue, 8 Dec 2020 12:17:38 +0000 (12:17 +0000)
committerYour Name <john.d.melton@googlemail.com>
Tue, 8 Dec 2020 12:17:38 +0000 (12:17 +0000)
css.c [new file with mode: 0644]

diff --git a/css.c b/css.c
new file mode 100644 (file)
index 0000000..c8b9ae3
--- /dev/null
+++ b/css.c
@@ -0,0 +1,26 @@
+#include <gtk/gtk.h>
+
+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);
+}