1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-28 23:42:51 -05:00

feat: New Notepad widget w/Autosave

- IPC: qs -c dms ipc call notepad toggle
This commit is contained in:
purian23
2025-09-01 19:46:01 -04:00
parent 53698040ab
commit 437d077bd6
10 changed files with 642 additions and 4 deletions

View File

@@ -341,6 +341,8 @@ PanelWindow {
return true
case "vpn":
return true
case "notepadButton":
return true
default:
return false
}
@@ -394,6 +396,8 @@ PanelWindow {
return keyboardLayoutNameComponent
case "vpn":
return vpnComponent
case "notepadButton":
return notepadButtonComponent
default:
return null
}
@@ -1152,6 +1156,36 @@ PanelWindow {
KeyboardLayoutName {}
}
Component {
id: notepadButtonComponent
NotepadButton {
isActive: notepadModalLoader.item ? notepadModalLoader.item.visible : false
widgetHeight: root.widgetHeight
barHeight: root.effectiveBarHeight
section: {
if (parent && parent.parent === leftSection)
return "left"
if (parent && parent.parent === rightSection)
return "right"
if (parent && parent.parent === centerSection)
return "center"
return "right"
}
popupTarget: {
notepadModalLoader.active = true
return notepadModalLoader.item
}
parentScreen: root.screen
onClicked: {
notepadModalLoader.active = true
if (notepadModalLoader.item) {
notepadModalLoader.item.toggle()
}
}
}
}
}
}
}