mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-04-14 09:42:10 -04:00
dankbar: layer enabled false + binding tweak
This commit is contained in:
@@ -624,7 +624,7 @@ PanelWindow {
|
|||||||
Item {
|
Item {
|
||||||
id: topBarCore
|
id: topBarCore
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
layer.enabled: true
|
layer.enabled: false
|
||||||
|
|
||||||
property bool autoHide: barConfig?.autoHide ?? false
|
property bool autoHide: barConfig?.autoHide ?? false
|
||||||
property bool revealSticky: false
|
property bool revealSticky: false
|
||||||
|
|||||||
@@ -29,12 +29,21 @@ Loader {
|
|||||||
|
|
||||||
readonly property bool orientationMatches: (axis?.isVertical ?? false) === isInColumn
|
readonly property bool orientationMatches: (axis?.isVertical ?? false) === isInColumn
|
||||||
|
|
||||||
|
readonly property bool widgetEnabled: widgetData?.enabled !== false
|
||||||
|
|
||||||
active: orientationMatches && getWidgetVisible(widgetId, DgopService.dgopAvailable) && (widgetId !== "music" || MprisController.activePlayer !== null)
|
active: orientationMatches && getWidgetVisible(widgetId, DgopService.dgopAvailable) && (widgetId !== "music" || MprisController.activePlayer !== null)
|
||||||
sourceComponent: getWidgetComponent(widgetId, components)
|
sourceComponent: getWidgetComponent(widgetId, components)
|
||||||
opacity: getWidgetEnabled(widgetData?.enabled) ? 1 : 0
|
|
||||||
|
|
||||||
signal contentItemReady(var item)
|
signal contentItemReady(var item)
|
||||||
|
|
||||||
|
Binding {
|
||||||
|
target: root.item
|
||||||
|
when: root.item && !root.widgetEnabled
|
||||||
|
property: "visible"
|
||||||
|
value: false
|
||||||
|
restoreMode: Binding.RestoreBinding
|
||||||
|
}
|
||||||
|
|
||||||
Binding {
|
Binding {
|
||||||
target: root.item
|
target: root.item
|
||||||
when: root.item && "parentScreen" in root.item
|
when: root.item && "parentScreen" in root.item
|
||||||
@@ -269,8 +278,4 @@ Loader {
|
|||||||
|
|
||||||
return widgetVisibility[widgetId] ?? true;
|
return widgetVisibility[widgetId] ?? true;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getWidgetEnabled(enabled) {
|
|
||||||
return enabled !== false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user