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:
@@ -14,31 +14,8 @@ Singleton {
|
|||||||
property var activeModal: null
|
property var activeModal: null
|
||||||
property bool windowsVisible: false
|
property bool windowsVisible: false
|
||||||
property var targetScreen: null
|
property var targetScreen: null
|
||||||
property var persistentModal: null
|
|
||||||
|
|
||||||
readonly property bool hasActiveModal: activeModal !== 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 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 var screen: backgroundWindow.screen
|
||||||
readonly property real dpr: screen ? CompositorService.getScreenScale(screen) : 1
|
readonly property real dpr: screen ? CompositorService.getScreenScale(screen) : 1
|
||||||
readonly property real shadowBuffer: 5
|
readonly property real shadowBuffer: 5
|
||||||
@@ -184,7 +161,7 @@ Singleton {
|
|||||||
|
|
||||||
PanelWindow {
|
PanelWindow {
|
||||||
id: backgroundWindow
|
id: backgroundWindow
|
||||||
visible: root.windowsVisible || root.shouldKeepWindowsAlive
|
visible: root.windowsVisible
|
||||||
screen: root.targetScreen
|
screen: root.targetScreen
|
||||||
color: "transparent"
|
color: "transparent"
|
||||||
|
|
||||||
@@ -246,7 +223,7 @@ Singleton {
|
|||||||
|
|
||||||
PanelWindow {
|
PanelWindow {
|
||||||
id: contentWindow
|
id: contentWindow
|
||||||
visible: root.windowsVisible || root.shouldKeepWindowsAlive
|
visible: root.windowsVisible
|
||||||
screen: root.targetScreen
|
screen: root.targetScreen
|
||||||
color: "transparent"
|
color: "transparent"
|
||||||
|
|
||||||
|
|||||||
@@ -130,10 +130,6 @@ DankModal {
|
|||||||
target: "spotlight"
|
target: "spotlight"
|
||||||
}
|
}
|
||||||
|
|
||||||
Component.onCompleted: {
|
|
||||||
DankModalWindow.persistentModal = spotlightModal;
|
|
||||||
}
|
|
||||||
|
|
||||||
SpotlightContent {
|
SpotlightContent {
|
||||||
id: spotlightContentInstance
|
id: spotlightContentInstance
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user