1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-04-30 09:32:05 -04:00
Files
DankMaterialShell/quickshell/Modules/Dock/DockTrashContextMenu.qml
2026-04-27 11:14:57 -04:00

56 lines
1.4 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: Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.2)
}
DockTrashMenuItem {
width: parent.width
iconName: "settings"
text: I18n.tr("Settings")
onTriggered: {
SettingsSearchService.navigateToSection("dockTrash");
PopoutService.openSettingsWithTab("dock");
root.close();
}
}
}