Reorder Control Center modules by drag and drop

Rows drag from anywhere (or the grip, Ctrl+Up/Down from the keyboard) with
an accent drop indicator, replacing the up/down buttons. The Control Center
runtime test drags instead of clicking, and turns off built-in notifications
since the live shell owns the bus name.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
mxandClaude Opus 5.5 committed 2026-10-15 14:55:15 +02:00
1 parent 395de70b26
commit 0b3bb83bc9
3 files changed
+157 -30

No files matched your search

+16
View File
@@ -165,6 +165,22 @@ Item {
input.mouseClick(pill, pill.width / 2, pill.height / 2);
return true;
}
// Drags one module grip onto the lower half of another row.
function settingsDrag(name: string, target: string): bool {
const content = ShellState.settingsWindow.contentItem;
const source = input.findChild(content, name), over = input.findChild(content, target);
if (!source || !over)
return false;
root.reveal(source);
const end = source.mapFromItem(over, over.width / 2, over.height - 4);
input.mousePress(source, source.width / 2, source.height / 2);
input.mouseMove(source, source.width / 2, source.height / 2 + 10, 40);
input.mouseMove(source, end.x, end.y, 80);
input.wait(80);
input.mouseRelease(source, end.x, end.y);
input.wait(80);
return true;
}
function settingsClick(name: string): bool {
const item = input.findChild(ShellState.settingsWindow.contentItem, name);
if (!item || !item.enabled)