From 49e64bb027905d0b40b6fa1250736e767ed3ab7b Mon Sep 17 00:00:00 2001 From: cberthet <capucine.berthet@savoirfairelinux.com> Date: Thu, 30 Nov 2023 12:03:41 -0500 Subject: [PATCH] UserProfile: resolve display issue GitLab: #1443 Change-Id: I0334364fbc5cbb84159a66459f25b21a1b8f9271 --- src/app/mainview/components/UserProfile.qml | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/src/app/mainview/components/UserProfile.qml b/src/app/mainview/components/UserProfile.qml index 7ba7a023d..e85b1138b 100644 --- a/src/app/mainview/components/UserProfile.qml +++ b/src/app/mainview/components/UserProfile.qml @@ -36,7 +36,7 @@ BaseModalDialog { popupContent: Rectangle { color: JamiTheme.backgroundRectangleColor - width: userProfileDialogLayout.width + 20 + width: idRectangle.width + 20 height: userProfileDialogLayout.height + 10 radius: 5 @@ -69,14 +69,12 @@ BaseModalDialog { ColumnLayout { id: userProfileDialogLayout - - width: Math.min(root.width, 400) spacing: 10 RowLayout { Layout.margins: 10 + Layout.preferredWidth: childrenRect.width - Layout.fillWidth: true spacing: 10 Avatar { @@ -153,8 +151,11 @@ BaseModalDialog { Rectangle { - Layout.preferredWidth: parent.width + id: idRectangle + Layout.alignment: Qt.AlignHCenter + + Layout.preferredWidth: idLayout.width + 20 radius: 5 color: root.backgroundColor @@ -162,12 +163,9 @@ BaseModalDialog { Layout.preferredHeight: contactId.height + 20 Layout.leftMargin: 10 - RowLayout { id: idLayout anchors.centerIn: parent - anchors.fill: parent - spacing: 15 Text { @@ -185,7 +183,7 @@ BaseModalDialog { TextEdit { id: contactId Layout.alignment: Qt.AlignLeft - Layout.preferredWidth: parent.width - identifierText.width - 35 + Layout.minimumWidth: 400 - identifierText.width - 2 * root.popupMargins - 35 font.pointSize: JamiTheme.textFontSize font.kerning: true @@ -199,7 +197,7 @@ BaseModalDialog { id: textMetricsContacIdText font: contactDisplayName.font text: idText - elideWidth: root.width - 200 + elideWidth: root.width - identifierText.width - 2 * root.popupMargins - 60 elide: Qt.ElideMiddle } -- GitLab