Verified Commit c2b84336 authored by ivan tkachenko's avatar ivan tkachenko
Browse files

Adjust blur offset behind plasmoid to match plasmoid itself

Fixes the wrong blur source positioning when there is an always visible
top panel. Can be easily observed when `blur.radius` is set to zero.

Also fixes blur stretching when dragging an applet to the right and/or
bottom screen edges in edit mode.

FIXED-IN: 5.26
(cherry picked from commit 0bbba7a7)
parent 06613216
Pipeline #241111 passed with stage
in 12 minutes and 57 seconds
......@@ -144,11 +144,9 @@ ContainmentLayoutManager.AppletContainer {
visible: background.blurEnabled && (appletContainer.applet.effectiveBackgroundHints & PlasmaCore.Types.StandardBackground)
z: -2
source: blur
maskSource:
ShaderEffectSource {
width: mask.width
height: mask.height
maskSource: ShaderEffectSource {
width: appletContainer.width
height: appletContainer.height
sourceRect: Qt.rect(Math.max(0, -appletContainer.x),
Math.max(0, -appletContainer.y),
width, height);
......@@ -161,20 +159,22 @@ ContainmentLayoutManager.AppletContainer {
}
}
FastBlur {
source: FastBlur {
id: blur
anchors.fill: parent
width: appletContainer.width
height: appletContainer.height
radius: 128
visible: false
source: ShaderEffectSource {
width: blur.width
height: blur.height
sourceRect: Qt.rect(Math.max(0, appletContainer.x),
Math.max(0, appletContainer.y),
appletContainer.width - Math.max(0, - (appletContainer.parent.width - appletContainer.x - appletContainer.width)),
appletContainer.height - Math.max(0, - (appletContainer.parent.height - appletContainer.y - appletContainer.height)));
width: appletContainer.width
height: appletContainer.height
sourceRect: Qt.rect(mask.x,
mask.y,
mask.width,
mask.height)
sourceItem: Plasmoid.wallpaper
}
}
......@@ -193,4 +193,4 @@ ContainmentLayoutManager.AppletContainer {
visible: applet.configurationRequired
onClicked: applet.action("configure").trigger();
}
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment