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

Modularize the Notepad

This commit is contained in:
purian23
2025-09-20 14:22:13 -04:00
parent 3cac6e5eea
commit d4816bd174
8 changed files with 1430 additions and 1316 deletions

View File

@@ -33,11 +33,11 @@ PanelWindow {
function getNotepadInstanceForScreen() {
if (!notepadVariants || !notepadVariants.instances) return null
for (var i = 0; i < notepadVariants.instances.length; i++) {
var loader = notepadVariants.instances[i]
if (loader.modelData && loader.modelData.name === root.screen?.name) {
return loader.ensureLoaded()
var slideout = notepadVariants.instances[i]
if (slideout.modelData && slideout.modelData.name === root.screen?.name) {
return slideout
}
}
return null
@@ -157,7 +157,7 @@ PanelWindow {
}
property var notepadInstance: null
property bool notepadInstanceVisible: notepadInstance?.notepadVisible ?? false
property bool notepadInstanceVisible: notepadInstance?.isVisible ?? false
readonly property bool hasActivePopout: {
const loaders = [{
@@ -1065,7 +1065,7 @@ PanelWindow {
NotepadButton {
property var notepadInstance: topBarCore.notepadInstance
isActive: notepadInstance?.notepadVisible ?? false
isActive: notepadInstance?.isVisible ?? false
widgetHeight: root.widgetHeight
barHeight: root.effectiveBarHeight
section: topBarContent.getWidgetSection(parent) || "right"