plasma and new shadow mess

Weng Xuetian wengxt at gmail.com
Mon Jan 7 12:00:48 GMT 2013


On Mon, Jan 7, 2013 at 5:14 AM, Martin Gräßlin <mgraesslin at kde.org> wrote:
On Monday 07 January 2013 10:51:11 Aaron J. Seigo wrote:
> On Sunday, January 6, 2013 17:40:42 Thomas Lübking wrote:
> > 1. it will make kwin link generic-shell what is sematically the
> > gnome/unity
> > shell approach.

In the case of TabBox or anything else in KWin (and also for most things in
Plasma like tooltips, extenders) we don't have the requirement that the
shadows may not be part of the window geometry as it just does not matter.
So
we get the disadvantage without any advantage.

Ok,  it's also not hard if we want to do so.

Here is something I have locally for trying to workaround kwin's shadow in
different approach.
It draw the shadow inside qml by using svg (well, just like what plasma do
in the past).

The only remain problem while I was trying is how to set the blur mask.
Actually current code already suggest the blur region is svg and using it
without plasma will somehow fails.
One way to set blur mask properly, is to set the imagePath by qml itself
(since Plasma::FrameSvg is not exported to qml), and add proper offset.
These can be all passed by rootObject.

http://paste.ubuntu.com/1506434/ (also attached)

This patch only change the big icon tabbox, but change to other is trivial.
It draw the shadow inside tabbox by Plasma::Svg.

Screenshot:
http://wstaw.org/m/2013/01/07/plasma-desktopoj1171.png

Well, it's not perfect, since if we really want qml based blur mask, we
should get region and apply all qml transform agaisnst the mask, which is
not possible from current API, but for tabbox, we may survive with such
limitation.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20130107/736f3597/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kwin-qml-shadow.patch
Type: application/octet-stream
Size: 7189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20130107/736f3597/attachment.obj>


More information about the kde-core-devel mailing list