From f7bf2899f7dc2500d4698006d4f3634baf76ad59 Mon Sep 17 00:00:00 2001
From: cberthet <capucine.berthet@savoirfairelinux.com>
Date: Tue, 21 Nov 2023 11:19:36 -0500
Subject: [PATCH] BaseModalDialog: scrollbar added when popups are too big

GitLab: #1417
Change-Id: I7b41398656269e474cbce90ace2ba1c89c5048df
---
 src/app/commoncomponents/BaseModalDialog.qml | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)

diff --git a/src/app/commoncomponents/BaseModalDialog.qml b/src/app/commoncomponents/BaseModalDialog.qml
index 60d7dc784..3e4f8dd81 100644
--- a/src/app/commoncomponents/BaseModalDialog.qml
+++ b/src/app/commoncomponents/BaseModalDialog.qml
@@ -112,12 +112,22 @@ Popup {
                 visible: text.length > 0
             }
 
-            Loader {
-                id: containerSubContentLoader
+            JamiFlickable {
+                id: flickable
 
+                Layout.fillHeight: true
+
+                Layout.preferredHeight: Math.min(contentHeight, root.height)
+                Layout.preferredWidth: contentItem.childrenRect.width
                 Layout.rightMargin: popupMargins
                 Layout.alignment: Qt.AlignCenter
-                Layout.maximumWidth: maximumPopupWidth - 2 * popupMargins
+
+                contentHeight: contentItem.childrenRect.height
+
+                contentItem.children: Loader {
+                    id: containerSubContentLoader
+                }
+                ScrollBar.horizontal.visible: false
             }
 
             DialogButtonBox {
-- 
GitLab