[gnome-shell] status/nightLight: Hide when unsupported



commit 4c495380a518bbcd61cdf6fadb6b76561b155427
Author: Florian Müllner <fmuellner gnome org>
Date:   Mon Aug 15 14:33:00 2022 +0200

    status/nightLight: Hide when unsupported
    
    https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5752
    
    Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2425>

 js/ui/status/nightLight.js | 5 +++++
 1 file changed, 5 insertions(+)
---
diff --git a/js/ui/status/nightLight.js b/js/ui/status/nightLight.js
index 1a0ee303a3..0d148e3ce7 100644
--- a/js/ui/status/nightLight.js
+++ b/js/ui/status/nightLight.js
@@ -22,6 +22,11 @@ class NightLightToggle extends QuickToggle {
             toggleMode: true,
         });
 
+        const monitorManager = global.backend.get_monitor_manager();
+        monitorManager.bind_property('night-light-supported',
+            this, 'visible',
+            GObject.BindingFlags.SYNC_CREATE);
+
         this._settings = new Gio.Settings({
             schema_id: 'org.gnome.settings-daemon.plugins.color',
         });


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]