1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-04-03 20:32:07 -04:00

fix(WallpaperBlur):Restore Blur on Overview mode on niri

This commit is contained in:
purian23
2026-03-18 17:43:49 -04:00
parent b227221df6
commit 368536f698

View File

@@ -84,9 +84,11 @@ Variants {
readonly property bool transitioning: transitionAnimation.running
property bool effectActive: false
property bool _renderSettling: true
property bool _overviewBlurSettling: false
property bool useNextForEffect: false
property string pendingWallpaper: ""
property string _deferredSource: ""
readonly property bool overviewBlurActive: CompositorService.isNiri && SettingsData.blurWallpaperOnOverview && NiriService.inOverview && currentWallpaper.source !== ""
Connections {
target: currentWallpaper
@@ -120,6 +122,22 @@ Variants {
}
}
Connections {
target: NiriService
function onInOverviewChanged() {
root._overviewBlurSettling = true;
overviewBlurSettleTimer.restart();
}
}
Connections {
target: SettingsData
function onBlurWallpaperOnOverviewChanged() {
root._overviewBlurSettling = true;
overviewBlurSettleTimer.restart();
}
}
Connections {
target: CompositorService
function onRandrDataReady() {
@@ -139,6 +157,12 @@ Variants {
onTriggered: root._renderSettling = false
}
Timer {
id: overviewBlurSettleTimer
interval: 150
onTriggered: root._overviewBlurSettling = false
}
function getFillMode(modeName) {
switch (modeName) {
case "Stretch":
@@ -164,7 +188,7 @@ Variants {
Component.onCompleted: {
if (typeof wallpaperWindow.updatesEnabled !== "undefined")
wallpaperWindow.updatesEnabled = Qt.binding(() => root.effectActive || root._renderSettling || currentWallpaper.status === Image.Loading || nextWallpaper.status === Image.Loading);
wallpaperWindow.updatesEnabled = Qt.binding(() => root.effectActive || root._renderSettling || root.overviewBlurActive || root._overviewBlurSettling || currentWallpaper.status === Image.Loading || nextWallpaper.status === Image.Loading);
if (!source) {
root._renderSettling = false;
@@ -573,8 +597,9 @@ Variants {
}
Loader {
id: overviewBlurLoader
anchors.fill: parent
active: CompositorService.isNiri && SettingsData.blurWallpaperOnOverview && NiriService.inOverview && currentWallpaper.source !== ""
active: root.overviewBlurActive
sourceComponent: MultiEffect {
anchors.fill: parent