shell: Add global CSS stylesheet

This commit is contained in:
Felipe Borges 2019-06-21 15:17:47 +02:00 committed by Robert Ancell
parent 3721f9ed4a
commit 4f099e33c5
3 changed files with 9 additions and 0 deletions

View file

@ -276,9 +276,17 @@ cc_application_class_init (CcApplicationClass *klass)
static void
cc_application_init (CcApplication *self)
{
g_autoptr(GtkCssProvider) provider = NULL;
cc_object_storage_initialize ();
g_application_add_main_option_entries (G_APPLICATION (self), all_options);
provider = gtk_css_provider_new ();
gtk_css_provider_load_from_resource (provider, "/org/gnome/ControlCenter/gtk/style.css");
gtk_style_context_add_provider_for_screen (gdk_screen_get_default (),
GTK_STYLE_PROVIDER (provider),
GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
}
GtkApplication *

View file

@ -4,5 +4,6 @@
<file preprocess="xml-stripblanks">cc-panel-list.ui</file>
<file preprocess="xml-stripblanks">cc-window.ui</file>
<file preprocess="xml-stripblanks">help-overlay.ui</file>
<file>style.css</file>
</gresource>
</gresources>

0
shell/style.css Normal file
View file