diff options
author | Ricky Kresslein <ricky@kressle.in> | 2022-02-20 19:19:45 +0100 |
---|---|---|
committer | Ricky Kresslein <ricky@kressle.in> | 2022-02-20 19:19:45 +0100 |
commit | 2a8e1c75863bc84c55eadcff1f3adb42d409d180 (patch) | |
tree | 8f5bb0f816a5ecffa25a01ab15ee84bc717cf99f /src/ui | |
parent | 379561117862952d567bfdbf0700b5c7f470a1a8 (diff) | |
download | Furtherance-2a8e1c75863bc84c55eadcff1f3adb42d409d180.tar.zst |
- Distinctive development mode
Diffstat (limited to 'src/ui')
-rw-r--r-- | src/ui/history_box.rs | 8 | ||||
-rw-r--r-- | src/ui/window.rs | 6 |
2 files changed, 13 insertions, 1 deletions
diff --git a/src/ui/history_box.rs b/src/ui/history_box.rs index 4de6dce..459c751 100644 --- a/src/ui/history_box.rs +++ b/src/ui/history_box.rs @@ -22,6 +22,7 @@ use glib::subclass; use crate::ui::FurTasksPage; use crate::FurtheranceApplication; use crate::database; +use crate::config; enum View { Loading, @@ -92,6 +93,13 @@ impl FurHistoryBox { } else { self.set_view(View::Empty); } + + // Change "empty" page icon for development mode + let imp = imp::FurHistoryBox::from_instance(self); + if config::PROFILE == "development" { + imp.welcome_page.set_icon_name(Some("com.lakoliu.Furtherance.Devel")); + } + } fn set_view(&self, view: View) { diff --git a/src/ui/window.rs b/src/ui/window.rs index 3106306..92c8282 100644 --- a/src/ui/window.rs +++ b/src/ui/window.rs @@ -31,6 +31,7 @@ use crate::ui::FurHistoryBox; use crate::FurtheranceApplication; use crate::database; use crate::settings_manager; +use crate::config; mod imp { use super::*; @@ -155,7 +156,10 @@ impl FurtheranceWindow { let stop_time = Rc::new(RefCell::new(Local::now())); // Development mode - // self.add_css_class("devel"); + if config::PROFILE == "development" { + self.add_css_class("devel"); + } + imp.start_button.connect_clicked(clone!( @weak self as this, |