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:
@@ -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
|
||||
|
||||
@@ -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}}"
|
||||
}
|
||||
Reference in New Issue
Block a user