mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-29 07:52:50 -05:00
feat: New Notepad widget w/Autosave
- IPC: qs -c dms ipc call notepad toggle
This commit is contained in:
@@ -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()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user