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:
@@ -84,9 +84,11 @@ Variants {
|
|||||||
readonly property bool transitioning: transitionAnimation.running
|
readonly property bool transitioning: transitionAnimation.running
|
||||||
property bool effectActive: false
|
property bool effectActive: false
|
||||||
property bool _renderSettling: true
|
property bool _renderSettling: true
|
||||||
|
property bool _overviewBlurSettling: false
|
||||||
property bool useNextForEffect: false
|
property bool useNextForEffect: false
|
||||||
property string pendingWallpaper: ""
|
property string pendingWallpaper: ""
|
||||||
property string _deferredSource: ""
|
property string _deferredSource: ""
|
||||||
|
readonly property bool overviewBlurActive: CompositorService.isNiri && SettingsData.blurWallpaperOnOverview && NiriService.inOverview && currentWallpaper.source !== ""
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
target: currentWallpaper
|
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 {
|
Connections {
|
||||||
target: CompositorService
|
target: CompositorService
|
||||||
function onRandrDataReady() {
|
function onRandrDataReady() {
|
||||||
@@ -139,6 +157,12 @@ Variants {
|
|||||||
onTriggered: root._renderSettling = false
|
onTriggered: root._renderSettling = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Timer {
|
||||||
|
id: overviewBlurSettleTimer
|
||||||
|
interval: 150
|
||||||
|
onTriggered: root._overviewBlurSettling = false
|
||||||
|
}
|
||||||
|
|
||||||
function getFillMode(modeName) {
|
function getFillMode(modeName) {
|
||||||
switch (modeName) {
|
switch (modeName) {
|
||||||
case "Stretch":
|
case "Stretch":
|
||||||
@@ -164,7 +188,7 @@ Variants {
|
|||||||
|
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
if (typeof wallpaperWindow.updatesEnabled !== "undefined")
|
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) {
|
if (!source) {
|
||||||
root._renderSettling = false;
|
root._renderSettling = false;
|
||||||
@@ -573,8 +597,9 @@ Variants {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Loader {
|
Loader {
|
||||||
|
id: overviewBlurLoader
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
active: CompositorService.isNiri && SettingsData.blurWallpaperOnOverview && NiriService.inOverview && currentWallpaper.source !== ""
|
active: root.overviewBlurActive
|
||||||
|
|
||||||
sourceComponent: MultiEffect {
|
sourceComponent: MultiEffect {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|||||||
Reference in New Issue
Block a user