[libdazzle] theming: raise priority of theme manager CSS



commit 96fa23f65ec1bef042327e242024d46b91384997
Author: Christian Hergert <chergert redhat com>
Date:   Tue Mar 24 14:21:09 2020 -0700

    theming: raise priority of theme manager CSS
    
    We need this higher so that we can override libraries like VTE from
    application CSS.

 src/theming/dzl-theme-manager.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
---
diff --git a/src/theming/dzl-theme-manager.c b/src/theming/dzl-theme-manager.c
index 96d363e..1a95f91 100644
--- a/src/theming/dzl-theme-manager.c
+++ b/src/theming/dzl-theme-manager.c
@@ -131,9 +131,15 @@ dzl_theme_manager_add_resources (DzlThemeManager *self,
     {
       provider = dzl_css_provider_new (css_dir);
       g_hash_table_insert (self->providers_by_path, g_strdup (resource_path), g_object_ref (provider));
+
+      /* Use APPLICATION+1 to place ourselves higher than libraries that
+       * incorrectly use APPLICATION as their priority. This allows the
+       * application (whose themes we'll be loading) to have higher
+       * priorities than libraries like VTE.
+       */
       gtk_style_context_add_provider_for_screen (gdk_screen_get_default (),
                                                  GTK_STYLE_PROVIDER (provider),
-                                                 GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
+                                                 GTK_STYLE_PROVIDER_PRIORITY_APPLICATION+1);
     }
 
   /*


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]