From 84fe2d751f5e7250fc9df3a9870bd0ba318e49df Mon Sep 17 00:00:00 2001 From: Guilherme Pagano Date: Tue, 2 Jun 2026 16:31:55 -0300 Subject: [PATCH] fix(control-center): honor plugin ccDetailHeight instead of fixed 250px slot (#2559) --- .../ControlCenter/Components/DragDropGrid.qml | 23 ++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/quickshell/Modules/ControlCenter/Components/DragDropGrid.qml b/quickshell/Modules/ControlCenter/Components/DragDropGrid.qml index 90d8ec72..7685157f 100644 --- a/quickshell/Modules/ControlCenter/Components/DragDropGrid.qml +++ b/quickshell/Modules/ControlCenter/Components/DragDropGrid.qml @@ -38,6 +38,9 @@ Column { property real currentRowWidth: 0 property int expandedRowIndex: -1 property var colorPickerModal: null + // Detail instance of the currently expanded plugin section, so the grid can + // honor its dynamic ccDetailHeight instead of a fixed slot size. + property var activePluginDetailInstance: null readonly property real _maxDetailHeight: { const rows = layoutResult.rows; @@ -79,8 +82,10 @@ Column { return Math.min(350, _maxDetailHeight); if (section.startsWith("brightnessSlider_")) return Math.min(400, _maxDetailHeight); - if (section.startsWith("plugin_")) - return Math.min(250, _maxDetailHeight); + if (section.startsWith("plugin_")) { + const h = activePluginDetailInstance ? activePluginDetailInstance.ccDetailHeight : 0; + return Math.min(h > 0 ? h : 250, _maxDetailHeight); + } return Math.min(250, _maxDetailHeight); } @@ -258,7 +263,19 @@ Column { retainedWidgetData = root.expandedWidgetData; } - onActiveChanged: retainActiveDetail() + function syncActivePluginDetail() { + if (active) { + root.activePluginDetailInstance = pluginDetailInstance; + } else if (root.activePluginDetailInstance === pluginDetailInstance) { + root.activePluginDetailInstance = null; + } + } + + onActiveChanged: { + retainActiveDetail(); + syncActivePluginDetail(); + } + onPluginDetailInstanceChanged: syncActivePluginDetail() onHeightChanged: { if (!active && height <= 0.5) { retainedSection = "";