[gnome-music/wip/mschraal/gtk4: 65/66] application: Fix style context provider
- From: Marinus Schraal <mschraal src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/mschraal/gtk4: 65/66] application: Fix style context provider
- Date: Mon, 4 Nov 2019 14:54:27 +0000 (UTC)
commit 98e8641b7a50a7b30b4253a53a8214be67297ef8
Author: Marinus Schraal <mschraal gnome org>
Date: Thu Oct 31 18:01:06 2019 +0100
application: Fix style context provider
gnomemusic/application.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/gnomemusic/application.py b/gnomemusic/application.py
index 0d2f5902..67f31b8b 100644
--- a/gnomemusic/application.py
+++ b/gnomemusic/application.py
@@ -60,7 +60,6 @@ class Application(Gtk.Application):
GLib.set_prgname(application_id)
GLib.setenv("PULSE_PROP_media.role", "music", True)
- self._init_style()
self._window = None
self._coreselection = CoreSelection()
@@ -76,9 +75,9 @@ class Application(Gtk.Application):
css_provider = Gtk.CssProvider()
css_provider.load_from_resource('/org/gnome/Music/org.gnome.Music.css')
display = Gdk.Display.get_default()
- style_context = Gtk.StyleContext()
- # style_context.add_provider_for_display(
- # display, css_provider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION)
+ style_context = self._window.get_style_context()
+ style_context.add_provider_for_display(
+ display, css_provider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION)
@GObject.Property(
type=Player, default=None, flags=GObject.ParamFlags.READABLE)
@@ -168,6 +167,7 @@ class Application(Gtk.Application):
if not self._window:
self._window = Window(self)
self._window.set_default_icon_name(self.props.application_id)
+ self._init_style()
if self.props.application_id == "org.gnome.Music.Devel":
self._window.get_style_context().add_class('devel')
MPRIS(self)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]