summaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorFelipe Borges <felipeborges@gnome.org>2019-06-21 15:17:47 +0200
committerRobert Ancell <robert.ancell@gmail.com>2019-07-16 22:34:26 +0000
commit4f099e33c5fd3afa9ad37c1e5b62abb9ba645ec5 (patch)
treee50f1eb33bfb6e8f4d28260a4b63c5ca78c82952 /shell
parent3721f9ed4a37f643c17726760af248106e472146 (diff)
downloadgnome-control-center-4f099e33c5fd3afa9ad37c1e5b62abb9ba645ec5.tar.gz
shell: Add global CSS stylesheet
Diffstat (limited to 'shell')
-rw-r--r--shell/cc-application.c8
-rw-r--r--shell/gnome-control-center.gresource.xml1
-rw-r--r--shell/style.css0
3 files changed, 9 insertions, 0 deletions
diff --git a/shell/cc-application.c b/shell/cc-application.c
index 67beb383c..aea0e9b72 100644
--- a/shell/cc-application.c
+++ b/shell/cc-application.c
@@ -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 *
diff --git a/shell/gnome-control-center.gresource.xml b/shell/gnome-control-center.gresource.xml
index 567dc783b..9be077ec9 100644
--- a/shell/gnome-control-center.gresource.xml
+++ b/shell/gnome-control-center.gresource.xml
@@ -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>
diff --git a/shell/style.css b/shell/style.css
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/shell/style.css