1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-04-16 10:42:06 -04:00

feat(Notepad): Add Expand/Collapse IPC handlers

This commit is contained in:
purian23
2026-04-15 18:24:20 -04:00
parent 2138fbf8b7
commit 787d213722
3 changed files with 50 additions and 0 deletions

View File

@@ -310,6 +310,37 @@ Item {
return "NOTEPAD_TOGGLE_FAILED";
}
function expand(): string {
var instance = getActiveNotepadInstance();
if (instance) {
instance.expandedWidth = true;
if (!instance.isVisible)
instance.show();
return "NOTEPAD_EXPAND_SUCCESS";
}
return "NOTEPAD_EXPAND_FAILED";
}
function collapse(): string {
var instance = getActiveNotepadInstance();
if (instance) {
instance.expandedWidth = false;
if (!instance.isVisible)
instance.show();
return "NOTEPAD_COLLAPSE_SUCCESS";
}
return "NOTEPAD_COLLAPSE_FAILED";
}
function toggleExpand(): string {
var instance = getActiveNotepadInstance();
if (instance) {
instance.expandedWidth = !instance.expandedWidth;
return "NOTEPAD_TOGGLE_EXPAND_SUCCESS";
}
return "NOTEPAD_TOGGLE_EXPAND_FAILED";
}
target: "notepad"
}