[gnome-music/wip/mschraal/application-fixups: 11/12] application: Load css provider from resource
- From: Marinus Schraal <mschraal src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/mschraal/application-fixups: 11/12] application: Load css provider from resource
- Date: Wed, 12 Sep 2018 11:55:55 +0000 (UTC)
commit b94576f2586fe84fb299b1a623d892177b86dcf8
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 31e4ae65..66f3c939 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/org.gnome.Music.css')
css_provider = Gtk.CssProvider()
- css_provider.load_from_file(css_provider_file)
+ css_provider.load_from_resource('/org/gnome/Music/org.gnome.Music.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]