KDE-Rounded-Corners
KDE-Rounded-Corners copied to clipboard
Integrate to read shadow parameters passed from decoration in KDecoration2::DecorationShadow
Rather than setting the shadow and outline separately in ShapeCorners, ShapeCorners could be integrated with the KDecoration API and then read the shadow image, padding, and innerShadowRect that the decoration passes via KDecoration2::DecorationShadow.
This would be mean that ShapeCorners would support the exact shadow designs (many of them complex and non-symmetrical) in the plethora of existing window decorations already available, without having to tweak shadows and outlines separately.
Maybe the KDecoration API could also be updated so that a QPainterPath of the desired window shape could be passed from the decoration to KDecoration to clip the window to the desired shape.
(there is already a QRegion blurRegion for setting the blur region shape which does something similar - there are problems with the blurRegion though as a QRegion only contains integer values, which causes aliasing on scaled window corners on Wayland which needs floating point -- see bug https://bugs.kde.org/show_bug.cgi?id=453229 - if I get time I want to fix that by using a QPainterPath instead)