mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-08-04 20:48:29 -04:00
qs: numerous performance optimizations
- ClippingRectangle usages - Asynchronous loader usages - Replace cava visualizers with shaders
This commit is contained in:
@@ -120,6 +120,18 @@ Item {
|
||||
readonly property int borderWidth: SettingsData.dankLauncherV2BorderEnabled ? SettingsData.dankLauncherV2BorderThickness : 0
|
||||
readonly property bool useSingleWindow: CompositorService.isHyprland || useBackgroundDarken
|
||||
|
||||
// Blur region isn't auto-committed on geometry changes; kick twice to catch resize settling.
|
||||
function _kickBlurCommit() {
|
||||
launcherBlur.kick();
|
||||
Qt.callLater(launcherBlur.kick);
|
||||
}
|
||||
|
||||
onAlignedXChanged: _kickBlurCommit()
|
||||
onAlignedYChanged: _kickBlurCommit()
|
||||
onAlignedWidthChanged: _kickBlurCommit()
|
||||
on_ContentImplicitHChanged: _kickBlurCommit()
|
||||
onContentVisibleChanged: _kickBlurCommit()
|
||||
|
||||
signal dialogClosed
|
||||
|
||||
function _ensureContentLoadedAndInitialize(query, mode) {
|
||||
@@ -328,6 +340,7 @@ Item {
|
||||
exclusionMode: ExclusionMode.Ignore
|
||||
|
||||
WindowBlur {
|
||||
id: launcherBlur
|
||||
targetWindow: launcherWindow
|
||||
readonly property real op: Math.max(0, Math.min(1, (modalContainer.opacity - 0.06) * 2))
|
||||
blurX: modalContainer.x
|
||||
@@ -337,6 +350,9 @@ Item {
|
||||
blurRadius: root.cornerRadius
|
||||
}
|
||||
|
||||
onWidthChanged: root._kickBlurCommit()
|
||||
onHeightChanged: root._kickBlurCommit()
|
||||
|
||||
WlrLayershell.namespace: "dms:spotlight"
|
||||
WlrLayershell.layer: root.effectiveLauncherLayer
|
||||
WlrLayershell.exclusiveZone: -1
|
||||
@@ -421,6 +437,9 @@ Item {
|
||||
|
||||
opacity: contentVisible ? 1 : 0
|
||||
|
||||
onOpacityChanged: root._kickBlurCommit()
|
||||
onSlideOffsetChanged: root._kickBlurCommit()
|
||||
|
||||
Behavior on opacity {
|
||||
NumberAnimation {
|
||||
duration: contentVisible ? root._openDuration : root._closeDuration
|
||||
|
||||
Reference in New Issue
Block a user