From 81112ff1f80e5fbb7ca455418c213a40b2743a7e Mon Sep 17 00:00:00 2001 From: Fadi Shehadeh Date: Fri, 14 Mar 2025 13:45:40 -0400 Subject: [PATCH] RTL: Popup layout fix Reorganized layout margins for BaseModelDialog and adapted affected components. GitLab: #1946 Change-Id: I36d0a99fb81fd645cdcdd33a3d10ccea6d4c0424 --- src/app/commoncomponents/BaseModalDialog.qml | 12 +++++++----- src/app/wizardview/components/GoodToKnowPopup.qml | 9 ++++----- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/src/app/commoncomponents/BaseModalDialog.qml b/src/app/commoncomponents/BaseModalDialog.qml index 52c9dc72..c3a16773 100644 --- a/src/app/commoncomponents/BaseModalDialog.qml +++ b/src/app/commoncomponents/BaseModalDialog.qml @@ -56,11 +56,11 @@ Popup { id: container property color color: JamiTheme.secondaryBackgroundColor - leftPadding: popupMargins - bottomPadding: action1.visible || action2.visible ? 10 :popupMargins + bottomPadding: action1.visible || action2.visible ? 10 : popupMargins background: Rectangle { id: bgRect + radius: 5 color: container.color layer.enabled: true @@ -99,7 +99,7 @@ Popup { Label { id: titleText - Layout.rightMargin: popupMargins + Layout.leftMargin: popupMargins Layout.bottomMargin: 20 Layout.topMargin: closeButtonVisible ? 0 : 30 Layout.alignment: Qt.AlignLeft @@ -115,9 +115,9 @@ Popup { id: flickable Layout.fillHeight: true - Layout.preferredHeight: Math.min(contentHeight, root.height) Layout.preferredWidth: contentItem.childrenRect.width + Layout.leftMargin: popupMargins Layout.rightMargin: popupMargins Layout.alignment: Qt.AlignCenter @@ -126,11 +126,13 @@ Popup { contentItem.children: Loader { id: containerSubContentLoader } + ScrollBar.horizontal.visible: false } DialogButtonBox { id: buttonBox + Layout.alignment: Qt.AlignRight spacing: 1.5 @@ -179,7 +181,7 @@ Popup { color: JamiTheme.transparentColor // Color animation for overlay when pop up is shown. - ColorAnimation on color { + ColorAnimation on color { to: JamiTheme.popupOverlayColor duration: 500 } diff --git a/src/app/wizardview/components/GoodToKnowPopup.qml b/src/app/wizardview/components/GoodToKnowPopup.qml index 38e68152..a1bf78a1 100644 --- a/src/app/wizardview/components/GoodToKnowPopup.qml +++ b/src/app/wizardview/components/GoodToKnowPopup.qml @@ -35,7 +35,7 @@ BaseModalDialog { InfoBox { id: info - width: root.width - 2 * root.popupMargins + width: parent.width icoSource: JamiResources.laptop_black_24dp_svg title: JamiStrings.local description: JamiStrings.localAccount @@ -43,7 +43,7 @@ BaseModalDialog { } InfoBox { - width: root.width - 2 * root.popupMargins + width: parent.width icoSource: JamiResources.assignment_ind_black_24dp_svg title: JamiStrings.username description: JamiStrings.usernameRecommened @@ -51,7 +51,7 @@ BaseModalDialog { } InfoBox { - width: root.width - 2 * root.popupMargins + width: parent.width icoSource: JamiResources.lock_svg title: JamiStrings.encrypt description: JamiStrings.passwordOptional @@ -59,7 +59,7 @@ BaseModalDialog { } InfoBox { - width: root.width - 2 * root.popupMargins + width: parent.width icoSource: JamiResources.brush_black_24dp_svg title: JamiStrings.customize description: JamiStrings.customizeOptional @@ -67,4 +67,3 @@ BaseModalDialog { } } } -