@@ -10,6 +10,7 @@ import org.kde.plasma.core as PlasmaCore
10
10
import org.kde.plasma.plasmoid
11
11
import QtQuick.Effects
12
12
import Qt5Compat.GraphicalEffects
13
+ import "components" as Components
13
14
14
15
import "code/utils.js" as Utils
15
16
import "code/globals.js" as Globals
@@ -1121,6 +1122,61 @@ PlasmoidItem {
1121
1122
position = Utils .getGlobalPosition (borderRec, panelElement);
1122
1123
panelColorizer .updatePanelMask (maskIndex, borderRec, rect .corners .topLeftRadius , rect .corners .topRightRadius , rect .corners .bottomLeftRadius , rect .corners .bottomRightRadius , Qt .point (rect .positionX - moveX, rect .positionY - moveY), 5 , visible && blurBehind);
1123
1124
}
1125
+
1126
+ Kirigami .ShadowedRectangle {
1127
+ id: backgroundMaskSource
1128
+ anchors .fill : parent
1129
+ corners {
1130
+ topLeftRadius: topLeftRadius
1131
+ topRightRadius: topRightRadius
1132
+ bottomLeftRadius: bottomLeftRadius
1133
+ bottomRightRadius: bottomRightRadius
1134
+ }
1135
+ }
1136
+
1137
+ Components .MaskEffect {
1138
+ id: backgroundMask
1139
+ anchors .fill : parent
1140
+ source: targetShaderSource
1141
+ mask: maskShaderSource
1142
+ enabled: rect .isWidget && ! panelBgItem .bgEnabled || true
1143
+ sourceOpacity: 1
1144
+ }
1145
+
1146
+ Components .MaskEffect {
1147
+ id: dropShadowMask
1148
+ anchors .fill : parent
1149
+ source: shadowShaderSource
1150
+ mask: maskShaderSource
1151
+ enabled: rect .isWidget && ! panelBgItem .bgEnabled || true
1152
+ sourceOpacity: 1
1153
+ }
1154
+
1155
+ ShaderEffectSource {
1156
+ id: targetShaderSource
1157
+ sourceItem: {
1158
+ if (rect .isPanel && panelBgItem .bgEnabled ) {
1159
+ return rect .target .visibleChildren [0 ];
1160
+ }
1161
+ return rect .target ? .applet ?? null ;
1162
+ }
1163
+ live: true
1164
+ hideSource: true
1165
+ }
1166
+
1167
+ ShaderEffectSource {
1168
+ id: shadowShaderSource
1169
+ sourceItem: dropShadow
1170
+ live: true
1171
+ hideSource: true
1172
+ }
1173
+
1174
+ ShaderEffectSource {
1175
+ id: maskShaderSource
1176
+ sourceItem: backgroundMaskSource
1177
+ hideSource: true
1178
+ live: true
1179
+ }
1124
1180
}
1125
1181
1126
1182
// Search the actual gridLayout of the panel
0 commit comments