[gnome-music/wip/merge: 236/343] Load css and uncomment add_class calls
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/merge: 236/343] Load css and uncomment add_class calls
- Date: Thu, 25 Jul 2013 11:32:38 +0000 (UTC)
commit ce637205fdba850905d3ca308b049ec31411f02a
Author: Vadim Rutkovsky <vrutkovs redhat com>
Date: Wed Jul 17 20:04:53 2013 +0200
Load css and uncomment add_class calls
gnomemusic/application.py | 9 ++++++++-
gnomemusic/widgets.py | 4 ++--
2 files changed, 10 insertions(+), 3 deletions(-)
---
diff --git a/gnomemusic/application.py b/gnomemusic/application.py
index 21ea058..61a586c 100644
--- a/gnomemusic/application.py
+++ b/gnomemusic/application.py
@@ -1,4 +1,4 @@
-from gi.repository import Gtk, Gio, GLib
+from gi.repository import Gtk, Gio, GLib, Gdk
from gnomemusic.window import Window
@@ -9,6 +9,13 @@ class Application(Gtk.Application):
flags=Gio.ApplicationFlags.FLAGS_NONE,
inactivity_timeout=12000)
GLib.set_application_name("Music")
+
+ cssProvider = Gtk.CssProvider()
+ cssProvider.load_from_path('data/application.css')
+ screen = Gdk.Screen.get_default()
+ styleContext = Gtk.StyleContext()
+ styleContext.add_provider_for_screen(screen, cssProvider,
+ Gtk.STYLE_PROVIDER_PRIORITY_USER)
def do_startup(self):
Gtk.Application.do_startup(self)
diff --git a/gnomemusic/widgets.py b/gnomemusic/widgets.py
index 7a4d459..2cb8987 100644
--- a/gnomemusic/widgets.py
+++ b/gnomemusic/widgets.py
@@ -102,8 +102,8 @@ class AlbumWidget(Gtk.EventBox):
self.add(self.ui.get_object("AlbumWidget"))
self._add_list_renderers()
# TODO: make this work
- #self.get_style_context().add_class("view")
- #self.get_style_context().add_class("content-view")
+ self.get_style_context().add_class("view")
+ self.get_style_context().add_class("content-view")
self.show_all()
def _on_item_activated(self, widget, id, path):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]