Skip to content
Snippets Groups Projects
Commit 9df0d837 authored by Guido Gunther's avatar Guido Gunther :zzz:
Browse files

Add css setup

so we can style lockscreen, panel and favorites
parent f8d2b4dc
No related branches found
No related tags found
No related merge requests found
......@@ -200,6 +200,28 @@ background_create (struct desktop *desktop)
}
static void
css_setup (struct desktop *desktop)
{
GtkCssProvider *provider;
GFile *file;
GError *error = NULL;
provider = gtk_css_provider_new ();
file = g_file_new_for_uri ("resource:///sm/puri/phosh/style.css");
if (!gtk_css_provider_load_from_file (provider, file, &error)) {
g_warning ("Failed to load CSS file: %s", error->message);
g_clear_error (&error);
g_object_unref (file);
return;
}
gtk_style_context_add_provider_for_screen (gdk_screen_get_default (),
GTK_STYLE_PROVIDER (provider), 600);
g_object_unref (file);
}
static void
shell_configure (struct desktop *desktop,
uint32_t edges,
......@@ -324,6 +346,7 @@ int main(int argc, char *argv[])
return -1;
}
css_setup (desktop);
background_create (desktop);
panel_create (desktop);
......
......@@ -2,5 +2,6 @@
<gresources>
<gresource prefix="/sm/puri/phosh">
<file preprocess="xml-stripblanks">ui/top-panel.ui</file>
<file compressed="true">style.css</file>
</gresource>
</gresources>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment