diff --git a/quickshell/Modules/ControlCenter/Widgets/CcSliderRow.qml b/quickshell/Modules/ControlCenter/Widgets/CcSliderRow.qml index a81f6aacb..93240991d 100644 --- a/quickshell/Modules/ControlCenter/Widgets/CcSliderRow.qml +++ b/quickshell/Modules/ControlCenter/Widgets/CcSliderRow.qml @@ -17,6 +17,8 @@ Item { property real columns: 4 property real rows: 1 property bool compact: columns <= 2 && rows === 1 + property bool small: false + readonly property real bodyInset: small ? Math.max(0, (height - CcMetrics.smallRowHeight) / 2) : 0 property string iconName: "" property string iconLabel: "" property string iconTooltip: "" @@ -135,13 +137,13 @@ Item { onSliderValueChanged: newValue => root.sliderValueChanged(newValue) Binding on trackHeight { - when: !root.tall + when: !root.tall && !root.small value: CcMetrics.stripTrackHeight restoreMode: Binding.RestoreBinding } Binding on handleHeight { - when: !root.tall + when: !root.tall && !root.small value: CcMetrics.stripHandleHeight restoreMode: Binding.RestoreBinding } diff --git a/quickshell/Modules/ControlCenter/utils/widgets.js b/quickshell/Modules/ControlCenter/utils/widgets.js index d496a117b..4afc86f06 100644 --- a/quickshell/Modules/ControlCenter/utils/widgets.js +++ b/quickshell/Modules/ControlCenter/utils/widgets.js @@ -17,7 +17,7 @@ function isSliderWidget(id) { } function canShrink(id) { - return id !== "user" && !isSliderWidget(id); + return id !== "user"; } function isSmall(widget, rows) { @@ -25,7 +25,7 @@ function isSmall(widget, rows) { } function canGroup(widget) { - return canShrink(widget?.id) && widget?.id !== GROUP_ID; + return canShrink(widget?.id) && !isSliderWidget(widget?.id) && widget?.id !== GROUP_ID; } // Members of a group that no longer exists fall back to the grid. @@ -38,10 +38,12 @@ function inGroup(widget, ids) { } function groupMembers(widgets, groupId) { - return widgets.reduce((members, widget, index) => widget?.group === groupId && isShown(widget) ? members.concat([{ + return widgets.reduce((members, widget, index) => widget?.group === groupId && isShown(widget) ? members.concat([ + { "index": index, "widget": widget - }]) : members, []); + } + ]) : members, []); } function isRemovable(widget) {