1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-04-30 17:42:06 -04:00

dock: add trash CLI, refine implementation

This commit is contained in:
bbedward
2026-04-27 11:14:22 -04:00
parent c9b38023d5
commit 36a7692da7
18 changed files with 1855 additions and 977 deletions

View File

@@ -479,14 +479,33 @@ Item {
delegate: Item {
id: delegateItem
property var dockButton: itemData.type === "launcher" ? launcherButton : (itemData.type === "trash" ? trashButton : button)
property var dockButton: {
switch (itemData.type) {
case "launcher":
return launcherButton;
case "trash":
return trashButton;
default:
return button;
}
}
property var itemData: modelData
readonly property bool isOverflowToggle: itemData.type === "overflow-toggle"
readonly property bool isTrash: itemData.type === "trash"
readonly property bool isInOverflow: itemData.isInOverflow === true
readonly property bool isDragging: {
switch (itemData.type) {
case "launcher":
return launcherButton.dragging;
case "trash":
return false;
default:
return button.dragging;
}
}
clip: false
z: (itemData.type === "launcher" ? launcherButton.dragging : (itemData.type === "trash" ? false : button.dragging)) ? 100 : 0
z: isDragging ? 100 : 0
visible: !isInOverflow || root.overflowExpanded
opacity: (isInOverflow && !root.overflowExpanded) ? 0 : 1
scale: (isInOverflow && !root.overflowExpanded) ? 0.8 : 1