From 79ff7936e6ab62d42b67a0b88c0572c2f335e9e1 Mon Sep 17 00:00:00 2001 From: Matteo Pasotti Date: Sat, 11 Jan 2014 15:40:08 +0100 Subject: - layout fixed (ncurses input fields are now better sized) --- AdminPanel/Hosts/GHosts.pm | 40 +++++++++++++++++++++------------------- 1 file changed, 21 insertions(+), 19 deletions(-) (limited to 'AdminPanel') diff --git a/AdminPanel/Hosts/GHosts.pm b/AdminPanel/Hosts/GHosts.pm index 8687f9b0..345a8e8c 100644 --- a/AdminPanel/Hosts/GHosts.pm +++ b/AdminPanel/Hosts/GHosts.pm @@ -86,31 +86,33 @@ sub _addHostDialog { my $layout = $factory->createVBox($dlg); my $hbox_header = $factory->createHBox($layout); - my $hbox_content = $factory->createHBox($layout); - my $leftContent = $factory->createVBox($hbox_content); - my $rightContent = $factory->createVBox($hbox_content); + my $vbox_content = $factory->createVBox($layout); my $hbox_footer = $factory->createHBox($layout); - $leftContent->setWeight($yui::YD_HORIZ, 1); - $rightContent->setWeight($yui::YD_HORIZ, 2); - # header my $labelDescription = $factory->createLabel($hbox_header,"Add the informations"); # content - my $labelIPAddress = $factory->createLabel($leftContent,"IP Address"); - my $labelHostName = $factory->createLabel($leftContent,"Hostname"); - my $labelHostAlias = $factory->createLabel($leftContent,"Host aliases"); - $labelIPAddress->setWeight($yui::YD_HORIZ, 1); - $labelHostName->setWeight($yui::YD_HORIZ, 1); - $labelHostAlias->setWeight($yui::YD_HORIZ, 1); - - my $textIPAddress = $factory->createInputField($rightContent,""); - my $textHostName = $factory->createInputField($rightContent,""); - my $textHostAlias = $factory->createInputField($rightContent,""); - $textIPAddress->setWeight($yui::YD_HORIZ, 2); - $textHostName->setWeight($yui::YD_HORIZ, 2); - $textHostAlias->setWeight($yui::YD_HORIZ, 2); + # my $labelIPAddress = $factory->createLabel($leftContent,"IP Address"); + # my $labelHostName = $factory->createLabel($leftContent,"Hostname"); + # my $labelHostAlias = $factory->createLabel($leftContent,"Host aliases"); + my $firstHbox = $factory->createHBox($vbox_content); + my $secondHbox = $factory->createHBox($vbox_content); + my $thirdHbox = $factory->createHBox($vbox_content); + + my $labelIPAddress = $factory->createLabel($firstHbox,"IP Address"); + my $labelHostName = $factory->createLabel($secondHbox,"Hostname"); + my $labelHostAlias = $factory->createLabel($thirdHbox,"Host aliases"); + $labelIPAddress->setWeight($yui::YD_HORIZ, 10); + $labelHostName->setWeight($yui::YD_HORIZ, 10); + $labelHostAlias->setWeight($yui::YD_HORIZ, 10); + + my $textIPAddress = $factory->createInputField($firstHbox,""); + my $textHostName = $factory->createInputField($secondHbox,""); + my $textHostAlias = $factory->createInputField($thirdHbox,""); + $textIPAddress->setWeight($yui::YD_HORIZ, 30); + $textHostName->setWeight($yui::YD_HORIZ, 30); + $textHostAlias->setWeight($yui::YD_HORIZ, 30); # footer my $cancelButton = $factory->createPushButton($factory->createLeft($hbox_footer),"Cancel"); -- cgit v1.2.1