[gnome-boxes] Support Color Scheme user preference
- From: Felipe Borges <felipeborges src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes] Support Color Scheme user preference
- Date: Fri, 26 Nov 2021 11:18:53 +0000 (UTC)
commit 553a819ae4e7255821268f350a509ca55d70ccff
Author: Maximiliano Sandoval R <msandova gnome org>
Date: Thu Oct 14 14:18:44 2021 +0200
Support Color Scheme user preference
Requires a bump on the dependency once libhandy 1.6 is released.
data/org.gnome.boxes.gschema.xml | 7 -------
src/app-window.vala | 3 +--
src/meson.build | 2 ++
3 files changed, 3 insertions(+), 9 deletions(-)
---
diff --git a/data/org.gnome.boxes.gschema.xml b/data/org.gnome.boxes.gschema.xml
index 2cc1c570..e3b0d317 100644
--- a/data/org.gnome.boxes.gschema.xml
+++ b/data/org.gnome.boxes.gschema.xml
@@ -47,13 +47,6 @@
Whether Boxes is running for the first time
</description>
</key>
- <key name="override-theme" type="b">
- <default>true</default>
- <summary>Override theme</summary>
- <description>
- Whether Boxes will override the user's theme
- </description>
- </key>
<key name="shared-folders" type="s">
<default>""</default>
diff --git a/src/app-window.vala b/src/app-window.vala
index 7ee13cbc..770cd436 100644
--- a/src/app-window.vala
+++ b/src/app-window.vala
@@ -140,8 +140,7 @@ public AppWindow (Gtk.Application app) {
notify["ui-state"].connect (ui_state_changed);
Gtk.Window.set_default_icon_name (Config.APPLICATION_ID);
- var override_theme = settings.get_boolean ("override-theme");
- Gtk.Settings.get_default ().gtk_application_prefer_dark_theme = override_theme;
+ Hdy.StyleManager.get_default ().color_scheme = PREFER_DARK;
var provider = Boxes.load_css ("gtk-style.css");
Gtk.StyleContext.add_provider_for_screen (Gdk.Screen.get_default (),
diff --git a/src/meson.build b/src/meson.build
index a84bde5d..def83629 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -143,6 +143,8 @@ dependencies = [
spice = dependency ('spice-client-gtk-3.0', version: '>= 0.32')
if spice.found ()
vala_args += '--define=HAS_SPICE'
+ # FIXME Remove and bump version after libhandy 1.6 is released.
+ vala_args += '--disable-since-check'
dependencies += [
spice,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]