From a5a798093d91dc4d882cbbf0d741a83556686d3f Mon Sep 17 00:00:00 2001 From: yggverse Date: Sat, 3 Aug 2024 10:59:32 +0300 Subject: [PATCH] add separators, fix margins --- src/Entity/Browser/Container/Page/Auth.php | 38 +++++++++++++++++++--- 1 file changed, 33 insertions(+), 5 deletions(-) diff --git a/src/Entity/Browser/Container/Page/Auth.php b/src/Entity/Browser/Container/Page/Auth.php index 759517da..07006fad 100644 --- a/src/Entity/Browser/Container/Page/Auth.php +++ b/src/Entity/Browser/Container/Page/Auth.php @@ -8,10 +8,13 @@ use \Exception; use \GtkButtonsType; use \GtkDialogFlags; use \GtkEntry; +use \GtkLabel; use \GtkMessageDialog; use \GtkMessageType; +use \GtkOrientation; use \GtkRadioButton; use \GtkResponseType; +use \GtkSeparator; use \Yggverse\Yoda\Entity\Browser\Container\Page; @@ -136,6 +139,13 @@ class Auth } } + // Append separator + $content->add( + new GtkSeparator( + GtkOrientation::VERTICAL + ) + ); + // Build options list foreach ($this->_options as $id => $option) { @@ -144,18 +154,36 @@ class Auth $option ); - // Append name entry after new identity option + // Is new if (!$id) { + // Append name entry after new identity option $content->add( $this->_name, true, true, 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 $this->gtk->show_all(); @@ -228,6 +256,10 @@ class Auth $label ); + $option->set_margin_top( + $margin + ); + $option->set_margin_start( $margin ); @@ -236,10 +268,6 @@ class Auth $margin ); - $option->set_margin_bottom( - $margin - ); - $option->connect( 'toggled', function(): void