diff options
-rw-r--r-- | src/lib.rs | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/lib.rs b/src/lib.rs index 4cd388b..913a9a4 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -169,20 +169,14 @@ impl AsyncComponent for App { window } - fn init_loading_widgets(_root: Self::Root) -> Option<relm4::loading_widgets::LoadingWidgets> { - let root = gtk::Box::default(); - root.set_hexpand(true); - root.set_vexpand(true); - root.set_halign(gtk::Align::Center); - root.set_valign(gtk::Align::Center); + fn init_loading_widgets(root: Self::Root) -> Option<relm4::loading_widgets::LoadingWidgets> { let spinner = gtk::Spinner::builder() .spinning(true) .halign(gtk::Align::Center) .valign(gtk::Align::Center) .build(); - _root.set_content(Some(&root)); - root.append(&spinner); + root.set_content(Some(&spinner)); Some(LoadingWidgets::new(root, spinner)) } |