diff options
-rw-r--r-- | src/lib.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/lib.rs b/src/lib.rs index d178e07..4cd388b 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -171,12 +171,17 @@ impl AsyncComponent for App { 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); let spinner = gtk::Spinner::builder() .spinning(true) .halign(gtk::Align::Center) .valign(gtk::Align::Center) .build(); + _root.set_content(Some(&root)); root.append(&spinner); Some(LoadingWidgets::new(root, spinner)) } |