Files
DankMaterialShell/quickshell/Modules/ControlCenter/Widgets/CcTileActions.qml
T
purian23 d694107f36 feat(density): interface density setting for shell surfaces
- density setting (spacious, comfortable, compact, dense)
- bar, dock, island and frame sizes follow density presets and keep values the user changed
- launcher no longer rebuilds every frame while the action panel animates
- cc toggle rows match the single-height list rows
- ipc settings set runs change hooks and rejects unknown keys and density values
- state layer focus and pressed follow the library's m3 values
- bump dux-qml-common for density menu and file browser metrics

(cherry picked from commit 76025038df)
2026-10-27 20:49:36 -04:00

42 lines
1.3 KiB
QML

pragma ComponentBehavior: Bound
import QtQuick
import qs.Common
import qs.Modules.ControlCenter
CcTileContent {
id: root
property var actions: []
readonly property int capacity: Math.max(0, Math.floor((height + Theme.groupedListGap) / (CcMetrics.rowHeight + Theme.groupedListGap)))
CcGroup {
width: parent.width
Repeater {
model: root.actions.slice(0, root.capacity)
CcListRow {
required property var modelData
title: modelData.text
singleLineTitle: true
rowColor: Theme.foregroundColor(Theme.chipSurface)
Accessible.role: modelData.active === undefined ? Accessible.Button : modelData.toggle ? Accessible.CheckBox : Accessible.RadioButton
Accessible.checkable: modelData.active !== undefined
Accessible.checked: active
Accessible.onToggleAction: {
if (enabled)
modelData.trigger();
}
iconName: modelData.icon || ""
active: modelData.active ?? false
enabled: modelData.enabled !== false
clickable: true
paddingH: Theme.spacingM
onClicked: modelData.trigger()
}
}
}
}