Hi, I would like to propose a new component for Plasma QML components: ShadowEffect.
This component has been created for Homerun and is used to show a shadow behind texts when Homerun is used as a containment. It is similar to the QGraphicsDropShadowEffect which comes with Qt, but provides a more visible shadow (QGraphicsDropShadowEffect shadow is hardly visible when one sets the blurRadius to anything higher than 2). It uses Plasma::PaintUtils::shadowBlur() to render the shadow, painting it twice to ensure it is visible. It is also capable of automatically picking a shadow color based on the item color. This comes at the price of duplicating some internal Qt code though, as can be seen in the .cpp file. The code currently lives in Homerun repository. You can have a look at it here: https://projects.kde.org/projects/playground/base/homerun/repository/revisions/master/entry/components/shadoweffect.h https://projects.kde.org/projects/playground/base/homerun/repository/revisions/master/entry/components/shadoweffect.cpp I put together a short QML test demonstrating how to use it, attached to this email. It looks like this: http://wstaw.org/m/2013/04/03/plasma-windowedP23222.png Is this something you would be interested to have in Plasma QML components? Aurélien
shadow-demo.qml
Description: Binary data
_______________________________________________ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel