about summary refs log tree commit diff
path: root/src/application.rs
diff options
context:
space:
mode:
authorRicky Kresslein <rk@lakoliu.com>2022-03-22 11:24:25 +0100
committerRicky Kresslein <rk@lakoliu.com>2022-03-22 11:24:25 +0100
commit3312d180c0743494702f52cb715f2d86772db9a4 (patch)
treebcda2ac6d3b68531d3799b4c4c485b799c1beb9c /src/application.rs
parentf767543f6f22404649429ecd3d16b6adcc7f7c14 (diff)
downloadFurtherance-3312d180c0743494702f52cb715f2d86772db9a4.tar.zst
- Dark Mode off by default
- Dark mode toggle switches immediately
Diffstat (limited to 'src/application.rs')
-rwxr-xr-xsrc/application.rs16
1 files changed, 2 insertions, 14 deletions
diff --git a/src/application.rs b/src/application.rs
index 6d051ba..bc90642 100755
--- a/src/application.rs
+++ b/src/application.rs
@@ -28,9 +28,7 @@ mod imp {
     use super::*;
 
     #[derive(Debug, Default)]
-    pub struct FurtheranceApplication {
-        // pub settings: gio::Settings,
-    }
+    pub struct FurtheranceApplication {}
 
     #[glib::object_subclass]
     impl ObjectSubclass for FurtheranceApplication {
@@ -115,16 +113,6 @@ impl FurtheranceApplication {
     }
 
     fn setup_application(&self) {
-        let app_id = config::APP_ID.trim_end_matches(".Devel");
-        let settings = gio::Settings::new(app_id);
-
-        settings.connect_changed(
-            Some("dark-mode"),
-            clone!(@weak self as app => move |_, _| {
-                    app.update_light_dark();
-                }
-            ),
-        );
         self.update_light_dark()
     }
 
@@ -197,7 +185,7 @@ impl FurtheranceApplication {
         }
     }
 
-    fn update_light_dark(&self) {
+    pub fn update_light_dark(&self) {
         let manager = adw::StyleManager::default();
 
         if !manager.system_supports_color_schemes() {