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

Revert "spotlight: optimize to keep loaded"

This reverts commit 01b28e3ee8.
This commit is contained in:
bbedward
2025-12-03 10:34:19 -05:00
parent 1c7ebc4323
commit c331e2f39e
2 changed files with 2 additions and 29 deletions

View File

@@ -14,31 +14,8 @@ Singleton {
property var activeModal: null
property bool windowsVisible: false
property var targetScreen: null
property var persistentModal: null
readonly property bool hasActiveModal: activeModal !== null
readonly property bool hasPersistentModal: persistentModal !== null
readonly property bool isPersistentModalActive: hasActiveModal && activeModal === persistentModal
readonly property bool shouldShowModal: hasActiveModal
readonly property bool shouldKeepWindowsAlive: hasPersistentModal
onPersistentModalChanged: {
if (!persistentModal)
return;
cachedModal = persistentModal;
cachedModalWidth = Theme.px(persistentModal.modalWidth, dpr);
cachedModalHeight = Theme.px(persistentModal.modalHeight, dpr);
cachedModalX = calculateX(persistentModal);
cachedModalY = calculateY(persistentModal);
cachedAnimationDuration = persistentModal.animationDuration ?? Theme.shortDuration;
cachedEnterCurve = persistentModal.animationEnterCurve ?? Theme.expressiveCurves.expressiveFastSpatial;
cachedExitCurve = persistentModal.animationExitCurve ?? Theme.expressiveCurves.expressiveFastSpatial;
cachedScaleCollapsed = persistentModal.animationScaleCollapsed ?? 0.96;
if (persistentModal.directContent) {
persistentModal.directContent.parent = directContentWrapper;
persistentModal.directContent.anchors.fill = directContentWrapper;
}
}
readonly property var screen: backgroundWindow.screen
readonly property real dpr: screen ? CompositorService.getScreenScale(screen) : 1
readonly property real shadowBuffer: 5
@@ -184,7 +161,7 @@ Singleton {
PanelWindow {
id: backgroundWindow
visible: root.windowsVisible || root.shouldKeepWindowsAlive
visible: root.windowsVisible
screen: root.targetScreen
color: "transparent"
@@ -246,7 +223,7 @@ Singleton {
PanelWindow {
id: contentWindow
visible: root.windowsVisible || root.shouldKeepWindowsAlive
visible: root.windowsVisible
screen: root.targetScreen
color: "transparent"

View File

@@ -130,10 +130,6 @@ DankModal {
target: "spotlight"
}
Component.onCompleted: {
DankModalWindow.persistentModal = spotlightModal;
}
SpotlightContent {
id: spotlightContentInstance