void-packages/srcpkgs/io.elementary.music/patches/hardcode-theme.patch

43 lines
1.7 KiB
Diff

https://github.com/elementary/music/pull/723
From 4e22268d38574e56eb3b42ae201c99cc98b510db Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Danielle=20For=C3=A9?= <danielle@elementary.io>
Date: Wed, 10 Aug 2022 11:28:23 -0700
Subject: [PATCH] Application: hard code gtk styles (#723)
---
src/Application.vala | 3 +++
src/MainWindow.vala | 5 -----
2 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/src/Application.vala b/src/Application.vala
index a0ddc7c64..84ec0f8cb 100644
--- a/src/Application.vala
+++ b/src/Application.vala
@@ -74,6 +74,9 @@ public class Music.Application : Gtk.Application {
var granite_settings = Granite.Settings.get_default ();
var gtk_settings = Gtk.Settings.get_default ();
+ gtk_settings.gtk_icon_theme_name = "elementary";
+ gtk_settings.gtk_theme_name = "io.elementary.stylesheet.orange";
+
gtk_settings.gtk_application_prefer_dark_theme = (
granite_settings.prefers_color_scheme == Granite.Settings.ColorScheme.DARK
);
diff --git a/src/MainWindow.vala b/src/MainWindow.vala
index b7536ef3e..4d1be9fbb 100644
--- a/src/MainWindow.vala
+++ b/src/MainWindow.vala
@@ -11,11 +11,6 @@ public class Music.MainWindow : Gtk.ApplicationWindow {
construct {
var playback_manager = PlaybackManager.get_default ();
- var css_provider = new Gtk.CssProvider ();
- css_provider.load_from_data ("@define-color accent_color @ORANGE_500;".data);
-
- Gtk.StyleContext.add_provider_for_display (Gdk.Display.get_default (), css_provider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION);
-
var start_window_controls = new Gtk.WindowControls (Gtk.PackType.START) {
hexpand = true
};