1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-04-04 12:52:06 -04:00

process list: add all/user/system filters

This commit is contained in:
bbedward
2026-02-17 11:25:05 -05:00
parent d6650be008
commit 92a25fdb6a
20 changed files with 1555 additions and 346 deletions

View File

@@ -14,6 +14,7 @@ DankPopout {
property var triggerScreen: null
property string searchText: ""
property string expandedPid: ""
property string processFilter: "all"
function hide() {
close();
@@ -42,6 +43,7 @@ DankPopout {
if (!shouldBeVisible) {
searchText = "";
expandedPid = "";
processFilter = "all";
}
}
@@ -110,6 +112,7 @@ DankPopout {
Qt.callLater(() => searchField.forceActiveFocus());
} else {
processesView.reset();
processFilterGroup.currentIndex = 0;
}
}
}
@@ -146,6 +149,32 @@ DankPopout {
Layout.fillWidth: true
}
DankButtonGroup {
id: processFilterGroup
Layout.minimumWidth: implicitWidth + 8
model: [I18n.tr("All"), I18n.tr("User"), I18n.tr("System")]
currentIndex: 0
checkEnabled: false
buttonHeight: Math.round(Theme.fontSizeMedium * 2.2)
textSize: Theme.fontSizeSmall
onSelectionChanged: (index, selected) => {
if (!selected)
return;
currentIndex = index;
switch (index) {
case 0:
processListPopout.processFilter = "all";
return;
case 1:
processListPopout.processFilter = "user";
return;
case 2:
processListPopout.processFilter = "system";
return;
}
}
}
DankTextField {
id: searchField
Layout.preferredWidth: Theme.fontSizeMedium * 14
@@ -334,6 +363,7 @@ DankPopout {
anchors.margins: Theme.spacingS
searchText: processListPopout.searchText
expandedPid: processListPopout.expandedPid
processFilter: processListPopout.processFilter
contextMenu: processContextMenu
onExpandedPidChanged: processListPopout.expandedPid = expandedPid
}