porting the QtCurve kwin theme

Martin Graesslin mgraesslin at kde.org
Sat Jul 2 13:55:22 UTC 2016


On Saturday, July 2, 2016 3:17:49 PM CEST René J. V. Bertin wrote:
> Hi,
> 
> Rather than example minimal from-scratch KDecoration2 examples, is/are there
> examples showing how to write a sort of minimal KDecoration2->legacy
> wrapper/proxy (and then work from there modernising the code)?

One cannot have a wrapper/proxy. KDecoration was modelled around QWidget with 
KCommonDecoration using QPushButtons for the buttons. KDecoration2 doesn't 
depend on QWidgets any more and all it has is a QPainter based API for 
rendering and QEvents for input interaction. Wrapping the old decoration is 
not possible due to the QWidget dependency, KWin would not be able to render 
it.

How to port the code really depends on how the legacy decoration plugin is 
based. A code base which heavily depends on QWidget is difficult to port. A code 
base which has the rendering abstracted and uses KCommonDecoration is easier 
to port.

> 
> I presume that's not unlike how Oxygen was adapted?

Oxygen was KCommonDecoration based and had the rendering quite well abstracted 
due to the fact that it's shared with the widget style.

My suggestion for a port is to separate the drawing logic to have it free from 
QWidgets and then integrate it into a KDecoration2 code base.

Cheers
Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20160702/702489b2/attachment.sig>


More information about the Plasma-devel mailing list