Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
July 27, 2012 10:05 pm

KWin Adds Support for QML Decorations


As part of a KDE-wide effort to prepare for Qt 5/QtQuick2, and a push to improve the window manager, KWin now sports QML decoration support. Currently, the C++ API for decorators is "...not very Qt like and requires a strong understanding of how the window decoration in KWin works ... [and] seems to be too difficult to be used." This complexity increases maintenance burden: "In 4.9 we ship four window decorations: the Aurorae theme engine, Oxygen, Plastik, b2 and Laptop. Together they are 10 kSLOC of C++ code and 1 kSLOC QML code (Aurorae). Before Aurorae got ported to QML the size of the decorations was 13 kSLOC. Overall that is about 10 per cent of the KWin source base, which is rather large." Basing his work on the QML version of the Aurorae engine, Martin Gräßlin set out to port Plastik to QML (the C++ version has already bitrotted, and was slated for removal): "After one and a half days of work I’m proud to say that writing decorations in QML is possible. ... In the current state the decoration consists of 370 lines of QML code and I expect to need an additional 100 lines to finish the buttons (they are already functional, that is the close button closes the window) and add some of the configuration options. The same API in C++ consists of 1500 lines of code. So we do not only get fewer lines of code but also a more readable and easier to maintain codebase. For something like a window decoration a declarative approach is much better suited than the imperative C++ way of painting elements."

Read more of this story at Slashdot.


Original Link: http://rss.slashdot.org/~r/Slashdot/slashdot/~3/26r1hl7Qf-0/kwin-adds-support-for-qml-decorations

Share this article:    Share on Facebook
View Full Article

Slashdot

Slashdot was originally created in September of 1997 by Rob "CmdrTaco" Malda. Today it is owned by Geeknet, Inc..

More About this Source Visit Slashdot