Hold power actions to confirm instead of a confirm row

Logout, reboot and shut down now fill with accent liquid while held and
run once full; letting go early drains it. A tap hints to hold. Replaces
the Confirm/Cancel rows in the control center tile and dashboard tab.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
mxandClaude Opus 5.5 committed 2026-11-28 01:05:11 +01:00
1 parent 1e918414d1
commit d37f9b7121
10 files changed
+350 -102

No files matched your search

+11
View File
@@ -178,6 +178,17 @@ Item {
input.mouseClick(item, item.width / 2, item.height / 2);
return true;
}
// Presses an item and holds it for ms before releasing.
function hold(name: string, ms: int): bool {
const item = root.child(name);
if (!item || !item.enabled)
return false;
root.reveal(item);
input.mousePress(item, item.width / 2, item.height / 2);
input.wait(ms);
input.mouseRelease(item, item.width / 2, item.height / 2);
return true;
}
function slider(name: string): bool {
const item = root.child(name);
if (!item || !item.enabled)