diff options
author | Ricky Kresslein <rk@lakoliu.com> | 2022-06-10 15:35:12 +0300 |
---|---|---|
committer | Ricky Kresslein <rk@lakoliu.com> | 2022-06-10 15:35:12 +0300 |
commit | b9453ffad7590080ed67898062babd97bbea46af (patch) | |
tree | 2487ac15721a12081a1e8e5fdbc17639e054d081 /src/ui/history_box.rs | |
parent | d7099a4d98744481e8f7ecce4e9233e66af1fd44 (diff) | |
download | Furtherance-b9453ffad7590080ed67898062babd97bbea46af.tar.zst |
Center timer on empty (Issue #1)
Diffstat (limited to 'src/ui/history_box.rs')
-rwxr-xr-x | src/ui/history_box.rs | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/src/ui/history_box.rs b/src/ui/history_box.rs index 9d2f59f..445d796 100755 --- a/src/ui/history_box.rs +++ b/src/ui/history_box.rs @@ -19,7 +19,6 @@ use gtk::prelude::*; use gtk::subclass::prelude::*; use gtk::{glib, CompositeTemplate}; -use crate::config; use crate::database; use crate::ui::{FurTasksPage, FurtheranceWindow}; use crate::FurtheranceApplication; @@ -42,8 +41,6 @@ mod imp { #[template_child] pub spinner: TemplateChild<gtk::Spinner>, #[template_child] - pub welcome_page: TemplateChild<adw::StatusPage>, - #[template_child] pub tasks_page: TemplateChild<FurTasksPage>, } @@ -90,13 +87,6 @@ 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) { @@ -129,19 +119,20 @@ impl FurHistoryBox { Err(_) => false, }; if is_saved_task { + window.vertical_align(gtk::Align::Start); self.set_view(View::Loading); imp.tasks_page.build_task_list(); self.set_view(View::Tasks); - window.set_height_request(300); } else { self.set_view(View::Empty); - window.set_height_request(390); + window.vertical_align(gtk::Align::Center); } } pub fn empty_view(&self) { self.set_view(View::Empty); let window = FurtheranceWindow::default(); - window.set_height_request(390); + window.vertical_align(gtk::Align::Center); } } + |