1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-05-11 23:09:42 -04:00

feat(SystemUpdate): Implement system update IPC commands

This commit is contained in:
purian23
2026-05-08 21:00:23 -04:00
parent d8835f2bc6
commit 6167f22837
6 changed files with 104 additions and 32 deletions

View File

@@ -20,6 +20,24 @@ PanelWindow {
property var controlCenterButtonRef: null
property var clockButtonRef: null
property var systemUpdateButtonRef: null
function triggerSystemUpdate() {
systemUpdateLoader.active = true;
if (!systemUpdateLoader.item)
return;
const popout = systemUpdateLoader.item;
const barPosition = axis?.edge === "left" ? 2 : (axis?.edge === "right" ? 3 : (axis?.edge === "top" ? 0 : 1));
if (systemUpdateButtonRef && popout.setTriggerPosition) {
const screenPos = systemUpdateButtonRef.mapToItem(null, 0, 0);
const pos = SettingsData.getPopupTriggerPosition(screenPos, barWindow.screen, barWindow.effectiveBarThickness, systemUpdateButtonRef.width, barConfig?.spacing ?? 4, barPosition, barConfig);
const section = systemUpdateButtonRef.section || "right";
popout.setTriggerPosition(pos.x, pos.y, pos.width, section, barWindow.screen, barPosition, barWindow.effectiveBarThickness, barConfig?.spacing ?? 4, barConfig);
} else {
popout.screen = barWindow.screen;
}
PopoutManager.requestPopout(popout, undefined, "systemUpdate");
}
function triggerControlCenter() {
controlCenterLoader.active = true;