diff options
author | Vika <vika@fireburn.ru> | 2024-08-25 15:33:34 +0300 |
---|---|---|
committer | Vika <vika@fireburn.ru> | 2024-08-25 15:42:17 +0300 |
commit | 266cf1e14f400292972534bb92802e5004d653ce (patch) | |
tree | 9afb072af41e203426d5137b05a37c761b310685 | |
parent | d6a9055f77df057d1dfd48c45d18ee1cf8012b82 (diff) | |
download | bowl-266cf1e14f400292972534bb92802e5004d653ce.tar.zst |
Don't use an extraneous Box for the spinner
-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)) } |