From 1dd0ad71e983141bd992ca5c46086bf5ec0f93c2 Mon Sep 17 00:00:00 2001
From: cberthet <capucine.berthet@savoirfairelinux.com>
Date: Wed, 8 Nov 2023 16:30:51 -0500
Subject: [PATCH] PasswordDialog: new design

GitLab: #1417
Change-Id: Ic543f6b4332af15bbaea3c7b97a8642ff9dd387c
---
 src/app/commoncomponents/PasswordDialog.qml | 15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)

diff --git a/src/app/commoncomponents/PasswordDialog.qml b/src/app/commoncomponents/PasswordDialog.qml
index f9f31e15b..35b590de2 100644
--- a/src/app/commoncomponents/PasswordDialog.qml
+++ b/src/app/commoncomponents/PasswordDialog.qml
@@ -24,6 +24,8 @@ import net.jami.Constants 1.1
 BaseModalDialog {
     id: root
 
+    closeButtonVisible: false
+
     enum PasswordEnteringPurpose {
         ChangePassword,
         ExportAccount,
@@ -77,6 +79,7 @@ BaseModalDialog {
 
     popupContent: ColumnLayout {
         id: popupContentColumnLayout
+        width: JamiTheme.preferredDialogWidth
 
         spacing: 16
 
@@ -136,10 +139,8 @@ BaseModalDialog {
             id: currentPasswordEdit
 
             Layout.alignment: Qt.AlignHCenter
-            Layout.preferredWidth: JamiTheme.preferredFieldWidth
+            Layout.fillWidth: true
             Layout.preferredHeight: visible ? 48 : 0
-            Layout.leftMargin: JamiTheme.preferredMarginSize
-            Layout.rightMargin: JamiTheme.preferredMarginSize
 
             visible: purpose === PasswordDialog.ChangePassword || purpose === PasswordDialog.ExportAccount
             placeholderText: JamiStrings.enterCurrentPassword
@@ -151,10 +152,8 @@ BaseModalDialog {
             id: passwordEdit
 
             Layout.alignment: Qt.AlignHCenter
-            Layout.preferredWidth: JamiTheme.preferredFieldWidth
             Layout.preferredHeight: visible ? 48 : 0
-            Layout.leftMargin: JamiTheme.preferredMarginSize
-            Layout.rightMargin: JamiTheme.preferredMarginSize
+            Layout.fillWidth: true
 
             visible: purpose === PasswordDialog.ChangePassword || purpose === PasswordDialog.SetPassword
 
@@ -167,10 +166,8 @@ BaseModalDialog {
             id: confirmPasswordEdit
 
             Layout.alignment: Qt.AlignHCenter
-            Layout.preferredWidth: JamiTheme.preferredFieldWidth
             Layout.preferredHeight: visible ? 48 : 0
-            Layout.leftMargin: JamiTheme.preferredMarginSize
-            Layout.rightMargin: JamiTheme.preferredMarginSize
+            Layout.fillWidth: true
 
             visible: purpose === PasswordDialog.ChangePassword || purpose === PasswordDialog.SetPassword
 
-- 
GitLab