-
Notifications
You must be signed in to change notification settings - Fork 73
/
css.c
44 lines (39 loc) · 1.16 KB
/
css.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#include <gtk/gtk.h>
#include "css.h"
char *css=
" @define-color TOGGLE_ON rgb(100%,0%,0%);\n"
" @define-color TOGGLE_OFF rgb(70%,70%,70%);\n"
" #small_button {\n"
" padding: 0;\n"
" font-family: Sans;\n"
" font-size: 15px;\n"
" }\n"
" #small_toggle_button {\n"
" padding: 0;\n"
" font-family: Sans;\n"
" font-size: 15px;\n"
" background-image: none;\n"
" background-color: @TOGGLE_OFF;\n"
" }\n"
" #small_toggle_button:checked {\n"
" padding: 0;\n"
" font-family: Sans;\n"
" font-size: 15px;\n"
" background-image: none;\n"
" background-color: @TOGGLE_ON;\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);
}