Closed Yankwerks closed 1 month ago
Yeah, I noticed this too. Unfortunately the shadows are part of the panel background svg, so I am not sure if I can make my own shadow to draw outside the panel area. Will have to look into this.
Something I also wish was possible is to create my own background blurs and contrast but there doesn't seem to be a way to do that either with native qml
After some testing it seems the only reason the custom shadow works in floating mode is because the panel seems to be rendering a bigger transparent area, thus making the shadows be still inside the panel area.
Since the shadows come from the plasma theme svg, the panel is able to draw them in some way so that it goes outside the panel, so loading our own svg and then try to modify on the fly is maybe the only way to achieve this.
Hi, thanks to the work done in c++ plugin Custom blur region for panel background #50 it will be possible to keep the original background enabled with opacity 0 so the original shadow still renders outside the panel. In think this is a reasonable workaround for this problem
There is a rather hacky workaround that can be used on the main branch now.
As I said before, the shadow it's its own separate thing so it does not depend on the shape of the blur mask, quickly inspecting the panel code it seems it process the SVGs to obtain the shadow https://github.com/KDE/plasma-workspace/blob/1ce7ff6ddd0e44c138232cd8dabba8b8471e860d/shell/panelshadows_p.h#L14 https://github.com/KDE/plasma-workspace/blob/1ce7ff6ddd0e44c138232cd8dabba8b8471e860d/shell/panelview.cpp#L1871
The result is a shadow that does not change with our custom background:
And yes, we still need a way to remove that shadow if we want to draw blur on the custom background
After the rewrite is now possible to set margins to the custom background, this can be used to add some space below the area of the panel so the shadow is shown (exaggerated) there:
With this now we can create two different presets and have them switch when a window is maximized
The downside is that there will be some resizing as things in the panel change to fit the new thickness:
Another simpler way, if using solid custom background without margins, would be making a copy of that preset with the native background removed (formerly "Hide")
Closing this as I think the above workarounds solve the problem
Actually removing just the Panel native shadow without removing the blur may not be possible but I am tracking that in #59 anyway.
Currently when using the "Hide" panel background option, its original shadow is also hidden. This allows the panel to fully match the window decorations background color, as if it was also part of it:
However it comes with the side effect of making that same panel flat and dull when no window is maximized, due to its abstinence of a shadow:
This can be fixed by using colorizer's panel shadow option, however this option only works when the panel is of the floating type: