1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-08-02 11:38:30 -04:00
Files
DankMaterialShell/quickshell/Modules/Dock/DockTrashContextMenu.qml
2026-06-29 15:50:42 -04:00

56 lines
1.3 KiB
QML

import QtQuick
import qs.Common
import qs.Services
DockContextMenuBase {
id: root
property var dockApps: null
layerNamespace: "dms:dock-trash-context-menu"
function showForButton(button, dockHeight, dockScreen, parentDockApps) {
dockApps = parentDockApps || null;
show(button, dockHeight, dockScreen);
}
DockTrashMenuItem {
width: parent.width
iconName: "folder_open"
text: I18n.tr("Open Trash")
onTriggered: {
TrashService.openTrash();
root.close();
}
}
DockTrashMenuItem {
width: parent.width
iconName: "delete_forever"
isDestructive: true
enabled: !TrashService.isEmpty
text: TrashService.isEmpty ? I18n.tr("Empty Trash") : I18n.tr("Empty Trash (%1)").arg(TrashService.count)
onTriggered: {
TrashService.requestEmptyTrash();
root.close();
}
}
Rectangle {
width: parent.width
height: 1
color: Theme.outlineHeavy
}
DockTrashMenuItem {
width: parent.width
iconName: "settings"
text: I18n.tr("Settings")
onTriggered: {
SettingsSearchService.navigateToSection("dockTrash");
PopoutService.openSettingsWithTab("dock");
root.close();
}
}
}