1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2025-12-08 06:25:37 -05:00

fix binding loop

This commit is contained in:
bbedward
2025-09-05 08:22:51 -04:00
parent af5094b479
commit ba1125bc00
3 changed files with 31 additions and 12 deletions

View File

@@ -141,6 +141,9 @@ PanelWindow {
property bool autoHide: SettingsData.topBarAutoHide
property bool reveal: SettingsData.topBarVisible && (!autoHide || topBarMouseArea.containsMouse || hasActivePopout)
property var notepadInstance: null
property bool notepadInstanceVisible: notepadInstance?.notepadVisible ?? false
readonly property bool hasActivePopout: {
const loaders = [{
"loader": appDrawerLoader,
@@ -163,23 +166,22 @@ PanelWindow {
}, {
"loader": controlCenterLoader,
"prop": "shouldBeVisible"
}, {
"instance": root.getNotepadInstanceForScreen(),
"prop": "notepadVisible"
}, {
"loader": clipboardHistoryModalPopup,
"prop": "visible"
}]
return loaders.some(item => {
return notepadInstanceVisible || loaders.some(item => {
if (item.loader) {
return item.loader?.item?.[item.prop]
} else if (item.instance) {
return item.instance?.[item.prop]
}
return false
})
}
Component.onCompleted: {
notepadInstance = root.getNotepadInstanceForScreen()
}
Connections {
function onTopBarTransparencyChanged() {
topBarCore.backgroundTransparency = SettingsData.topBarTransparency
@@ -967,7 +969,7 @@ PanelWindow {
id: notepadButtonComponent
NotepadButton {
property var notepadInstance: root.getNotepadInstanceForScreen()
property var notepadInstance: topBarCore.notepadInstance
isActive: notepadInstance ? notepadInstance.notepadVisible : false
widgetHeight: root.widgetHeight
barHeight: root.effectiveBarHeight

View File

@@ -1,10 +1,27 @@
layout {
focus-ring {
active-color "{{colors.primary.default.hex}}"
inactive-color "{{colors.outline.default.hex}}"
urgent-color "{{colors.error.default.hex}}"
}
border {
active-color "{{colors.primary.default.hex}}"
inactive-color "{{colors.secondary.default.hex}}"
inactive-color "{{colors.outline.default.hex}}"
urgent-color "{{colors.error.default.hex}}"
}
focus-ring {
active-color "{{colors.inverse_primary.default.hex}}"
shadow {
color "{{colors.shadow.default.hex}}70"
}
tab-indicator {
active-color "{{colors.primary.default.hex}}"
inactive-color "{{colors.outline.default.hex}}"
urgent-color "{{colors.error.default.hex}}"
}
insert-hint {
color "{{colors.primary.default.hex}}80"
}
background-color "{{colors.background.default.hex}}"
}

View File

@@ -395,7 +395,7 @@ ShellRoot {
return ""
}
function getNotepadInstanceForScreen(screenName) {
function getNotepadInstanceForScreen(screenName: string) {
if (!screenName || notepadSlideoutVariants.instances.length === 0) {
return null
}