mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-10-29 06:27:47 -04:00
- 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
42 lines
1.3 KiB
QML
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()
|
|
}
|
|
}
|
|
}
|
|
}
|