public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Maximiliano Sandoval <m.sandoval@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH installer 4/7] use basic grid in password panel
Date: Tue, 20 Jun 2023 11:16:07 +0200	[thread overview]
Message-ID: <20230620091610.68835-5-m.sandoval@proxmox.com> (raw)
In-Reply-To: <20230620091610.68835-1-m.sandoval@proxmox.com>

The extra 10px margin on the email row was added to account for the
removed line:

    $vbox->pack_start($hbox3, 0, 0, 15);

Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
---
 proxinstall | 32 ++++++++++++++------------------
 1 file changed, 14 insertions(+), 18 deletions(-)

diff --git a/proxinstall b/proxinstall
index 7e1bcd4..faebdec 100755
--- a/proxinstall
+++ b/proxinstall
@@ -1821,47 +1821,43 @@ sub create_password_view {
 
     my $password = Proxmox::Install::Config::get_password();
 
-    my $vbox2 =  Gtk3::Box->new('vertical', 0);
-    $gtk_state->{inbox}->pack_start($vbox2, 1, 0, 0);
-    my $vbox =  Gtk3::Box->new('vertical', 0);
-    $vbox2->pack_start($vbox, 0, 0, 10);
+    my $grid = &$create_basic_grid();
+    $gtk_state->{inbox}->pack_start($grid, 0, 0, 0);
 
-    my $hbox1 = Gtk3::Box->new('horizontal', 0);
     my $label = Gtk3::Label->new("Password");
     $label->set_size_request(150, -1);
     $label->set_xalign(1.0);
-    $hbox1->pack_start($label, 0, 0, 10);
+    $grid->attach($label, 0, 0, 1, 1);
     my $pwe1 = Gtk3::Entry->new();
     $pwe1->set_visibility(0);
     $pwe1->set_text($password) if $password;
     $pwe1->set_size_request(200, -1);
-    $hbox1->pack_start($pwe1, 0, 0, 0);
+    $grid->attach($pwe1, 1, 0, 1, 1);
 
-    my $hbox2 = Gtk3::Box->new('horizontal', 0);
     $label = Gtk3::Label->new("Confirm");
     $label->set_size_request(150, -1);
     $label->set_xalign(1.0);
-    $hbox2->pack_start($label, 0, 0, 10);
+    $grid->attach($label, 0, 1, 1, 1);
     my $pwe2 = Gtk3::Entry->new();
     $pwe2->set_visibility(0);
     $pwe2->set_text($password) if $password;
     $pwe2->set_size_request(200, -1);
-    $hbox2->pack_start($pwe2, 0, 0, 0);
+    $grid->attach($pwe2, 1, 1, 1, 1);
 
-    my $hbox3 = Gtk3::Box->new('horizontal', 0);
     $label = Gtk3::Label->new("Email");
     $label->set_size_request(150, -1);
     $label->set_xalign(1.0);
-    $hbox3->pack_start($label, 0, 0, 10);
+    $label->set_margin_top(10);
+    $grid->attach($label, 0, 2, 1, 1);
+
+    my $mailto = Proxmox::Install::Config::get_mailto();
+
     my $eme = Gtk3::Entry->new();
     $eme->set_size_request(200, -1);
-    $eme->set_text(Proxmox::Install::Config::get_mailto());
-    $hbox3->pack_start($eme, 0, 0, 0);
-
+    $eme->set_text($mailto);
+    $eme->set_margin_top(10);
 
-    $vbox->pack_start($hbox1, 0, 0, 5);
-    $vbox->pack_start($hbox2, 0, 0, 5);
-    $vbox->pack_start($hbox3, 0, 0, 15);
+    $grid->attach($eme, 1, 2, 1, 1);
 
     $gtk_state->{inbox}->show_all;
 
-- 
2.39.2





  parent reply	other threads:[~2023-06-20  9:16 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-20  9:16 [pve-devel] [PATCH installer 0/7] use gtk grids when possible Maximiliano Sandoval
2023-06-20  9:16 ` [pve-devel] [PATCH installer 1/7] move create_basic_grid subroutine definition up Maximiliano Sandoval
2023-06-20  9:16 ` [pve-devel] [PATCH installer 2/7] use basic grid in the network panel Maximiliano Sandoval
2023-06-20  9:16 ` [pve-devel] [PATCH installer 3/7] expand ip address Gtk3::Entry Maximiliano Sandoval
2023-06-20  9:16 ` Maximiliano Sandoval [this message]
2023-06-20  9:16 ` [pve-devel] [PATCH installer 5/7] use basic grid in country/timezone panel Maximiliano Sandoval
2023-06-20  9:16 ` [pve-devel] [PATCH installer 6/7] change margins in create_basic_grid Maximiliano Sandoval
2023-06-20  9:16 ` [pve-devel] [PATCH installer 7/7] remove trailing spaces and colons from labels Maximiliano Sandoval

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230620091610.68835-5-m.sandoval@proxmox.com \
    --to=m.sandoval@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal