1
0
mirror of https://github.com/KDE/latte-dock.git synced 2025-01-11 13:18:13 +03:00

take into account roundness for pseudo-blur

--in editing mode the panel background blur takes
into account inside the qml window, it is used
as a demonstration for the user. This patch
takes into account the blurred area roundness
in order to not blur faulty areas that are not
going to be blurred in the end.
This commit is contained in:
Michail Vourlakos 2020-01-25 12:34:19 +02:00
parent da145bb57c
commit 210057af21
2 changed files with 20 additions and 4 deletions

View File

@ -297,7 +297,7 @@ Item{
Loader {
anchors.fill: solidBackground
active: editModeVisual.inEditMode && root.userShowPanelBackground && plasmoid.configuration.blurEnabled
sourceComponent: Item{
sourceComponent: Item {
Image{
id: backTiler
anchors.fill: parent
@ -312,7 +312,7 @@ Item{
ShaderEffectSource {
id: effectSource
anchors.fill: backTiler
anchors.fill: parent
visible: false
sourceItem: backTiler
@ -321,11 +321,26 @@ Item{
FastBlur{
id: blur
anchors.fill: effectSource
anchors.fill: parent
opacity: editModeVisual.appliedOpacity * 1.4
source: effectSource
radius: 50
visible: false
}
OpacityMask {
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
anchors.horizontalCenterOffset: overlayedBackground.painterRectangle.anchors.horizontalCenterOffset
anchors.verticalCenterOffset: overlayedBackground.painterRectangle.anchors.verticalCenterOffset
width: overlayedBackground.painterRectangle.width
height: overlayedBackground.painterRectangle.height
source: blur
maskSource: overlayedBackground.painterRectangle
opacity: blur.opacity
}
}
}

View File

@ -66,9 +66,10 @@ Item{
readonly property bool bothVerticals: (leftBorder && rightBorder)
readonly property bool bothHorizontals: (bottomBorder && topBorder)
readonly property bool drawWithoutRoundness: noOfBorders === 1
readonly property Item painterRectangle: painter
Binding{
target: main
property: "topBorder"