]> git.proxmox.com Git - pve-installer.git/commitdiff
tui: add top content padding for all installer views
authorChristoph Heiss <c.heiss@proxmox.com>
Tue, 6 Jun 2023 08:42:24 +0000 (10:42 +0200)
committerChristoph Heiss <c.heiss@proxmox.com>
Wed, 14 Jun 2023 08:39:56 +0000 (10:39 +0200)
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
proxmox-tui-installer/src/main.rs

index 43f4bf7b9cfb16784318687f26c6871e2cde9c47..d6bf0736eefe8a20c7f4d034987381fb82994dc0 100644 (file)
@@ -34,18 +34,20 @@ struct InstallerView {
 
 impl InstallerView {
     pub fn new<T: View>(view: T, next_cb: Box<dyn Fn(&mut Cursive)>) -> Self {
-        let inner = LinearLayout::vertical().child(view).child(PaddedView::lrtb(
-            1,
-            1,
-            1,
-            0,
-            LinearLayout::horizontal()
-                .child(abort_install_button())
-                .child(DummyView.full_width())
-                .child(Button::new("Previous", switch_to_prev_screen))
-                .child(DummyView)
-                .child(Button::new("Next", next_cb)),
-        ));
+        let inner = LinearLayout::vertical()
+            .child(PaddedView::lrtb(0, 0, 1, 1, view))
+            .child(PaddedView::lrtb(
+                1,
+                1,
+                0,
+                0,
+                LinearLayout::horizontal()
+                    .child(abort_install_button())
+                    .child(DummyView.full_width())
+                    .child(Button::new("Previous", switch_to_prev_screen))
+                    .child(DummyView)
+                    .child(Button::new("Next", next_cb)),
+            ));
 
         Self::with_raw(inner)
     }