From e23bd4073f9aee91db6efc759681da4436f5e2ef Mon Sep 17 00:00:00 2001 From: purian23 Date: Tue, 13 Oct 2026 16:03:25 -0400 Subject: [PATCH] island: restore normal control center height until edit mode --- quickshell/Modules/ControlCenter/ControlCenterContent.qml | 8 ++++---- .../Modules/DIsland/Activities/ControlCenterExpanded.qml | 3 ++- quickshell/Modules/DIsland/IslandController.qml | 8 ++++++-- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/quickshell/Modules/ControlCenter/ControlCenterContent.qml b/quickshell/Modules/ControlCenter/ControlCenterContent.qml index f16a74dd6..3903b319a 100644 --- a/quickshell/Modules/ControlCenter/ControlCenterContent.qml +++ b/quickshell/Modules/ControlCenter/ControlCenterContent.qml @@ -24,9 +24,9 @@ FocusScope { readonly property bool pageOpen: (host.expandedSection ?? "") !== "" readonly property real gridHeight: widgetGrid.gridHeight - // Held in both modes so entering edit mode never resizes the island or reflows tiles. + // Reserved from the grid in both modes so the island growing into edit mode never reflows tiles. readonly property real editRoom: host.editRoom ?? 0 - readonly property real chromeHeight: editRoom + readonly property real chromeHeight: (host.editRoomShown ?? false) ? editRoom : 0 readonly property bool stripAbove: host.stripAbove ?? false readonly property bool widgetSheetOpen: widgetSheetLoader.item?.active ?? false readonly property real coveredAmount: Math.max(detailPage.opacity, widgetSheetLoader.item?.progress ?? 0) @@ -48,7 +48,7 @@ FocusScope { // Held during a drag so the trash never moves under the pointer. readonly property real heldGridHeight: widgetGrid.dragging ? widgetGrid.pinnedHeight + dragRoom : gridHeight readonly property real targetImplicitHeight: { - const total = CcMetrics.sheetPadding * 2 + heldGridHeight + chromeHeight; + const total = CcMetrics.sheetPadding * 2 + heldGridHeight; if (detailPage.shownSection === "") return total; return Math.max(total, detailPage.topInset + detailPage.minimumHeight + CcMetrics.detailDialogInset); @@ -489,7 +489,7 @@ FocusScope { id: editActions x: 0 - y: root.editRoom > 0 ? root.height - root.editRoom + (root.editRoom - height) / 2 : (root.stripAbove ? -height : root.height) + y: root.editRoom > 0 ? Math.max(root.height - root.editRoom, CcMetrics.sheetPadding * 2 + root.heldGridHeight) + (root.editRoom - height) / 2 : (root.stripAbove ? -height : root.height) width: root.sheetContentWidth height: implicitHeight // Below the edit rings so the shoulder fill never covers them. diff --git a/quickshell/Modules/DIsland/Activities/ControlCenterExpanded.qml b/quickshell/Modules/DIsland/Activities/ControlCenterExpanded.qml index b9e95ad28..0bf979996 100644 --- a/quickshell/Modules/DIsland/Activities/ControlCenterExpanded.qml +++ b/quickshell/Modules/DIsland/Activities/ControlCenterExpanded.qml @@ -54,7 +54,7 @@ FocusScope { property bool editMode: false property string expandedSection: "" - onEditModeChanged: root.controller.setEditing("controlcenter", editMode) + onEditModeChanged: root.controller.setEditing("controlcenter", editMode, CcMetrics.islandEditRoom) readonly property int gridColumnCap: root.controller.controlCenterColumnCap readonly property int gridColumns: root.controller.controlCenterColumns @@ -65,6 +65,7 @@ FocusScope { readonly property bool shouldBeVisible: root.controller.activeActivity === "controlcenter" && root.controller.expanded readonly property bool headerTogglesClose: true readonly property real editRoom: CcMetrics.islandEditRoom + readonly property bool editRoomShown: root.controller.editRoomGranted && root.controller.editingActivity === "controlcenter" readonly property bool growsFromTop: root.controller.edge === "top" readonly property bool powerMenuOpen: PopoutService.powerMenuModalLoader?.item?.shouldBeVisible ?? false readonly property var screen: root.effectiveScreen diff --git a/quickshell/Modules/DIsland/IslandController.qml b/quickshell/Modules/DIsland/IslandController.qml index e968c279f..9e8f87c01 100644 --- a/quickshell/Modules/DIsland/IslandController.qml +++ b/quickshell/Modules/DIsland/IslandController.qml @@ -83,7 +83,7 @@ QtObject { readonly property int controlCenterColumns: Math.min(CcMetrics.gridColumns, controlCenterColumnCap) readonly property real controlCenterSheetWidth: CcMetrics.sheetWidthFor(controlCenterColumns) readonly property real controlCenterMaxWidth: CcMetrics.sheetWidthFor(editingActivity === "controlcenter" ? controlCenterColumnCap : controlCenterColumns) + controlCenterSheetInset - readonly property real controlCenterHeight: Math.max(320, Math.min(controlCenterMaxHeight, destinationContentHeight("controlcenter"))) + readonly property real controlCenterHeight: controlCenterHeightFor(editRoomGranted && editingActivity === "controlcenter") readonly property bool compactDense: compactThickness < 40 readonly property real compactFaceThickness: BarMetrics.compactFaceThickness(compactThickness) @@ -103,7 +103,7 @@ QtObject { readonly property real dashboardMaxWidth: Math.min(dashboardAvailableWidth, DashMetrics.widthFor(SettingsData.showWeekNumber, undefined, editingActivity !== "" ? dashboardColumnCap : DashRegistry.widestPanelColumns)) property var dashboardContentHeights: ({}) readonly property real dashChromeHeight: DashMetrics.islandHandleChromeHeight - readonly property real editSurfaceHeight: editRoom > 0 ? dashboardHeightFor(editingActivity, true) : 0 + readonly property real editSurfaceHeight: editRoom <= 0 ? 0 : editingActivity === "controlcenter" ? controlCenterHeightFor(true) : dashboardHeightFor(editingActivity, true) readonly property real dashboardHeight: Math.min(dashboardAvailableHeight, Math.max(DashMetrics.tabDefaultHeight + root.dashChromeHeight, ...Object.values(dashboardContentHeights))) readonly property int dashboardRowBudget: Math.max(DashMetrics.minimumTabRows, Math.floor((dashboardAvailableHeight - DashMetrics.islandEditChromeHeight + DashMetrics.gridGap) / (DashMetrics.gridRowUnit + DashMetrics.gridGap))) readonly property real mediaCompactMaxLength: 360 @@ -156,6 +156,10 @@ QtObject { return Math.min(dashboardAvailableHeight, height + (withEditRoom ? root.editRoom : 0)); } + function controlCenterHeightFor(withEditRoom) { + return Math.max(320, Math.min(controlCenterMaxHeight, destinationContentHeight("controlcenter") + (withEditRoom ? root.editRoom : 0))); + } + function dashboardTargetFor(activityId) { return sheetTarget(dashboardWidthFor(activityId), dashboardHeightFor(activityId, root.editRoomGranted && root.editingActivity === activityId)); }