From a028696e5770266c4da7c7a6b9f2d56e474fc42b Mon Sep 17 00:00:00 2001
From: Xavier Jouslin de Noray <xavier.jouslindenoray@savoirfairelinux.com>
Date: Fri, 25 Aug 2023 13:57:41 -0400
Subject: [PATCH] Plugin: change remote plugin margin

Change-Id: Id2289e5f22f23f0a1295dc63d00b6e36133e27b7
---
 src/app/constant/JamiTheme.qml                             | 7 ++++---
 .../settingsview/components/PluginAvailableDelegate.qml    | 6 ++++--
 2 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/src/app/constant/JamiTheme.qml b/src/app/constant/JamiTheme.qml
index d963a50b7..d417bcd97 100644
--- a/src/app/constant/JamiTheme.qml
+++ b/src/app/constant/JamiTheme.qml
@@ -273,7 +273,7 @@ Item {
     property real messageOptionTextFontSize: calcSize(15)
     property int emojiPickerWidth: 400
     property int emojiPickerHeight: 425
-    property int defaulMaxWidthReaction : 350
+    property int defaulMaxWidthReaction: 350
 
     // Files To Send Container
     property color removeFileButtonColor: Qt.rgba(96, 95, 97, 0.5)
@@ -389,9 +389,10 @@ Item {
     property real pluginHandlersPopupViewDelegateHeight: 50
     property color pluginDefaultBackgroundColor: "#666666"
     property real remotePluginMinimumDelegateWidth: 430
-    property real remotePluginMinimumDelegateHeight: 260
+    property real remotePluginMinimumDelegateHeight: 275
     property real remotePluginMaximumDelegateWidth: 645
-    property real remotePluginMaximumDelegateHeight: 390
+    property real remotePluginMaximumDelegateHeight: 413
+    property real iconMargin: 30 * baseZoom
     property real remotePluginDelegateWidth: remotePluginMinimumDelegateWidth * baseZoom
     property real remotePluginDelegateHeight: remotePluginMinimumDelegateHeight * baseZoom
     property color pluginViewBackgroundColor: darkTheme ? "#000000" : "#F0EFEF"
diff --git a/src/app/settingsview/components/PluginAvailableDelegate.qml b/src/app/settingsview/components/PluginAvailableDelegate.qml
index f01febea3..e3f03eb23 100644
--- a/src/app/settingsview/components/PluginAvailableDelegate.qml
+++ b/src/app/settingsview/components/PluginAvailableDelegate.qml
@@ -80,9 +80,9 @@ ItemDelegate {
         background: CachedImage {
             id: background
             defaultImage: JamiResources.default_plugin_background_jpg
-            downloadUrl: PluginAdapter.getBackgroundImageUrl(pluginName)
+            downloadUrl: PluginAdapter.getBackgroundImageUrl(pluginId)
             anchors.fill: parent
-            localPath: root.localPath === undefined ? '' : root.localPath
+            localPath: root.backgroundLocalPath === undefined ? '' : root.backgroundLocalPath
             imageFillMode: Image.PreserveAspectCrop
             LinearGradient {
                 id: gradient
@@ -165,6 +165,8 @@ ItemDelegate {
                 }
                 RowLayout {
                     Layout.alignment: Qt.AlignCenter
+                    Layout.topMargin: JamiTheme.iconMargin
+                    Layout.bottomMargin: JamiTheme.iconMargin
                     CachedImage {
                         id: icon
                         defaultImage: JamiResources.plugins_default_icon_svg
-- 
GitLab