[gnome-music/wip/mschraal/application-fixups: 1/2] application: Load css provider from resource



commit debef71f64e7b76a3dfe5d17883be61667cc1d5c
Author: Marinus Schraal <mschraal gnome org>
Date:   Thu Sep 6 02:36:30 2018 +0200

    application: Load css provider from resource

 gnomemusic/application.py | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
---
diff --git a/gnomemusic/application.py b/gnomemusic/application.py
index 8e4b38cd..a17658a6 100644
--- a/gnomemusic/application.py
+++ b/gnomemusic/application.py
@@ -60,10 +60,8 @@ class Application(Gtk.Application):
         self._application_id = application_id
 
     def _init_style(self):
-        css_provider_file = Gio.File.new_for_uri(
-            'resource:///org/gnome/Music/application.css')
         css_provider = Gtk.CssProvider()
-        css_provider.load_from_file(css_provider_file)
+        css_provider.load_from_resource('/org/gnome/Music/application.css')
         screen = Gdk.Screen.get_default()
         style_context = Gtk.StyleContext()
         style_context.add_provider_for_screen(


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