From c813f65581e15a65660b05717170e70c71b4e51d Mon Sep 17 00:00:00 2001 From: purian23 Date: Wed, 28 Oct 2026 16:34:24 -0400 Subject: [PATCH] island: size the launcher sheet to its results Port 2.0 (cherry picked from commit 0b174e070244041b88a253ada9c5fdbb58125d6d) --- quickshell/Modals/DLauncherV2/SpotlightLauncherContent.qml | 2 +- quickshell/Modules/DIsland/Activities/LauncherExpanded.qml | 4 +++- quickshell/Modules/DIsland/IslandBarHost.qml | 2 +- quickshell/Modules/DIsland/IslandController.qml | 4 +++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/quickshell/Modals/DLauncherV2/SpotlightLauncherContent.qml b/quickshell/Modals/DLauncherV2/SpotlightLauncherContent.qml index d21d9411c..ae1a995d5 100644 --- a/quickshell/Modals/DLauncherV2/SpotlightLauncherContent.qml +++ b/quickshell/Modals/DLauncherV2/SpotlightLauncherContent.qml @@ -23,7 +23,7 @@ FocusScope { property bool showResultsWithoutQuery: false property bool suspendSearchUpdates: false property real maxResultsHeight: 0 - // Off for fixed-height hosts, where the resize would only slide the bottom fade. + // Off for hosts that animate their own size, where this would only slide the bottom fade. property bool resizeAnimated: true property real resultsInset: LauncherMetrics.spotlightInset diff --git a/quickshell/Modules/DIsland/Activities/LauncherExpanded.qml b/quickshell/Modules/DIsland/Activities/LauncherExpanded.qml index e394a7c22..65576dedc 100644 --- a/quickshell/Modules/DIsland/Activities/LauncherExpanded.qml +++ b/quickshell/Modules/DIsland/Activities/LauncherExpanded.qml @@ -74,7 +74,9 @@ FocusScope { transientSurfaceTracker: root.transientSurfaceTracker showResultsWithoutQuery: true resizeAnimated: false - maxResultsHeight: Math.max(120, root.controller.launcherExpandedTarget.height - Theme.spacingM * 2 - launcherContent.searchAreaHeight - launcherContent.actionPanelHeight) + maxResultsHeight: Math.max(120, root.controller.launcherMaxHeight - Theme.spacingM * 2 - launcherContent.searchAreaHeight - launcherContent.actionPanelHeight) + + onImplicitHeightChanged: root.controller.setDestinationContentHeight("launcher", implicitHeight + Theme.spacingM * 2) } onActiveFocusChanged: root.controller.launcherInputFocused = activeFocus diff --git a/quickshell/Modules/DIsland/IslandBarHost.qml b/quickshell/Modules/DIsland/IslandBarHost.qml index 85fed1111..6732be861 100644 --- a/quickshell/Modules/DIsland/IslandBarHost.qml +++ b/quickshell/Modules/DIsland/IslandBarHost.qml @@ -170,7 +170,7 @@ Item { readonly property var springDampingRange: [10, 100] readonly property var springMassRange: [0.25, 3] readonly property int destinationMaxHeight: Math.max(destinationMinHeight, Math.min(destinationMaxHeightLimit, (root.screen?.height ?? referenceScreenHeight) - screenMargin)) - readonly property int maxActivityHeight: Math.max(root.heldEditSurfaceHeight, controller.dashboardHeight, controller.controlCenterHeight, controller.launcherExpandedTarget.height, controller.clipboardExpandedTarget.height, controller.powerMenuExpandedTarget.height, destinationMaxHeight) + readonly property int maxActivityHeight: Math.max(root.heldEditSurfaceHeight, controller.dashboardHeight, controller.controlCenterHeight, controller.launcherMaxHeight, controller.clipboardExpandedTarget.height, controller.powerMenuExpandedTarget.height, destinationMaxHeight) readonly property int maxActivityWidth: Math.max(controller.dashboardMaxWidth, controller.controlCenterMaxWidth, controller.launcherExpandedTarget.width, controller.clipboardExpandedTarget.width, controller.powerMenuExpandedTarget.width, Math.min(activityMaxWidth, Math.max(activityMinWidth, (root.screen?.width ?? referenceScreenWidth) - screenMargin))) readonly property real shadowPadding: surface.shadowEnabled ? Theme.elevationRenderPadding(Theme.elevationLevel2, surface.effectiveShadowDirection, Theme.spacingXS, Theme.spacingS, Theme.spacingL) : 0 readonly property int hostThickness: outerGap + nearInset + (root.isVertical ? maxActivityWidth : maxActivityHeight) + Theme.spacingS + shadowPadding diff --git a/quickshell/Modules/DIsland/IslandController.qml b/quickshell/Modules/DIsland/IslandController.qml index 5fc5268ee..b946f461b 100644 --- a/quickshell/Modules/DIsland/IslandController.qml +++ b/quickshell/Modules/DIsland/IslandController.qml @@ -487,7 +487,9 @@ QtObject { readonly property var mediaCompactTarget: pillTarget(mediaCompactLength, compactFaceThickness) readonly property var homeExpandedTarget: dashboardTargetFor("home") readonly property var mediaExpandedTarget: dashboardTargetFor("media") - readonly property var launcherExpandedTarget: sheetTarget(Math.min(dashboardAvailableWidth, LauncherMetrics.sizeWidth(SettingsData.dankLauncherV2Size)), Math.min(dashboardAvailableHeight, LauncherMetrics.sizeHeight(SettingsData.dankLauncherV2Size, LauncherMetrics.islandEdgeInset, false))) + readonly property real launcherMaxHeight: Math.min(dashboardAvailableHeight, LauncherMetrics.sizeHeight(SettingsData.dankLauncherV2Size, LauncherMetrics.islandEdgeInset, false)) + readonly property real launcherContentHeight: destinationContentHeight("launcher") + readonly property var launcherExpandedTarget: sheetTarget(Math.min(dashboardAvailableWidth, LauncherMetrics.sizeWidth(SettingsData.dankLauncherV2Size)), launcherContentHeight > 0 ? Math.min(launcherMaxHeight, launcherContentHeight) : launcherMaxHeight) readonly property var controlCenterExpandedTarget: sheetTarget(controlCenterSheetWidth + controlCenterSheetInset, controlCenterHeight) readonly property var systemCompactTarget: pillTarget(root.isVertical ? 240 : (SettingsData.osdAlwaysShowValue ? 330 : 282), compactFaceThickness) property real systemStateContentLength: 0