aboutsummaryrefslogtreecommitdiff
path: root/fastiv.c
diff options
context:
space:
mode:
authorPřemysl Eric Janouch <p@janouch.name>2021-10-17 12:44:23 +0200
committerPřemysl Eric Janouch <p@janouch.name>2021-10-17 12:48:15 +0200
commita6972e4c6e5653f97f29e6aefa4a1840a3105055 (patch)
tree98b25214b43dcccff92c814f32a2748f4ac175a0 /fastiv.c
parentfa7b1631f0a0ca911ad9a0aa41278f389f2b45eb (diff)
downloadfiv-a6972e4c6e5653f97f29e6aefa4a1840a3105055.tar.gz
fiv-a6972e4c6e5653f97f29e6aefa4a1840a3105055.tar.xz
fiv-a6972e4c6e5653f97f29e6aefa4a1840a3105055.zip
Don't hardcode the background colour
It can be now overriden in the user's gtk.css.
Diffstat (limited to 'fastiv.c')
-rw-r--r--fastiv.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/fastiv.c b/fastiv.c
index 7aa5b4b..f110274 100644
--- a/fastiv.c
+++ b/fastiv.c
@@ -425,6 +425,12 @@ main(int argc, char *argv[])
gtk_window_set_default_icon_name(PROJECT_NAME);
+ const char *style = "fastiv-view { background: black; }";
+ GtkCssProvider *provider = gtk_css_provider_new();
+ gtk_css_provider_load_from_data(provider, style, strlen(style), NULL);
+ gtk_style_context_add_provider_for_screen(gdk_screen_get_default(),
+ GTK_STYLE_PROVIDER(provider), GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
+
g.view = g_object_new(FASTIV_TYPE_VIEW, NULL);
g.window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
g_signal_connect(g.window, "destroy", G_CALLBACK(gtk_main_quit), NULL);