add separators, fix margins

This commit is contained in:
yggverse 2024-08-03 10:59:32 +03:00
parent 6c3dd46c2a
commit a5a798093d

View file

@ -8,10 +8,13 @@ use \Exception;
use \GtkButtonsType; use \GtkButtonsType;
use \GtkDialogFlags; use \GtkDialogFlags;
use \GtkEntry; use \GtkEntry;
use \GtkLabel;
use \GtkMessageDialog; use \GtkMessageDialog;
use \GtkMessageType; use \GtkMessageType;
use \GtkOrientation;
use \GtkRadioButton; use \GtkRadioButton;
use \GtkResponseType; use \GtkResponseType;
use \GtkSeparator;
use \Yggverse\Yoda\Entity\Browser\Container\Page; use \Yggverse\Yoda\Entity\Browser\Container\Page;
@ -136,6 +139,13 @@ class Auth
} }
} }
// Append separator
$content->add(
new GtkSeparator(
GtkOrientation::VERTICAL
)
);
// Build options list // Build options list
foreach ($this->_options as $id => $option) foreach ($this->_options as $id => $option)
{ {
@ -144,18 +154,36 @@ class Auth
$option $option
); );
// Append name entry after new identity option // Is new
if (!$id) if (!$id)
{ {
// Append name entry after new identity option
$content->add( $content->add(
$this->_name, $this->_name,
true, true,
true, true,
0 0
); );
// Append separator
$content->add(
new GtkSeparator(
GtkOrientation::VERTICAL
)
);
// Set margin
$option->set_margin_bottom(
self::DIALOG_CONTENT_OPTION_MARGIN
);
} }
} }
// Append empty line separator
$content->add(
new GtkLabel
);
// Render // Render
$this->gtk->show_all(); $this->gtk->show_all();
@ -228,6 +256,10 @@ class Auth
$label $label
); );
$option->set_margin_top(
$margin
);
$option->set_margin_start( $option->set_margin_start(
$margin $margin
); );
@ -236,10 +268,6 @@ class Auth
$margin $margin
); );
$option->set_margin_bottom(
$margin
);
$option->connect( $option->connect(
'toggled', 'toggled',
function(): void function(): void