From 0294759a54773c973dbd52043ab6cb11df21559f Mon Sep 17 00:00:00 2001 From: Lemmy Date: Mon, 9 Mar 2026 00:41:27 -0400 Subject: [PATCH] feat(plugins): settings popup allow for custom width --- Widgets/NPluginSettingsPopup.qml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Widgets/NPluginSettingsPopup.qml b/Widgets/NPluginSettingsPopup.qml index 85bb0d64d..e39463d70 100644 --- a/Widgets/NPluginSettingsPopup.qml +++ b/Widgets/NPluginSettingsPopup.qml @@ -14,7 +14,8 @@ Popup { property var screen: null readonly property real maxHeight: (screen ? screen.height : (parent ? parent.height : 800)) * 0.8 - width: Math.max(settingsContent.implicitWidth + padding * 2, 600 * Style.uiScaleRatio) + property real _minWidth: 600 * Style.uiScaleRatio + width: _minWidth height: Math.min(settingsContent.implicitHeight + padding * 2, maxHeight) padding: Style.marginXL @@ -143,6 +144,8 @@ Popup { "pluginApi": currentPluginApi }); + var preferred = (settingsLoader.item && settingsLoader.item.preferredWidth !== undefined) ? settingsLoader.item.preferredWidth + padding * 2 : 0; + width = Math.max(preferred, _minWidth); open(); } }