Tag Archives: plasmoid

A simple way to test Plasma themes


Some time ago when testing the code that draws the svg themes in Plasma (like applet backgrounds, panels and tooltips) i wrote a very simple plasmoid that its sole purpose was to test that code, its very uninspiring name was SvgPanelTest, because surprise surprise it was a test for the class named SvgPanel:P
It turns out this applet can be actually useful also for theme designers that wants to test the themes they’re doing without killing plasma all the times.

Since now there is a contest to make Plasma even more gorgeous, i’ve decided to publish it in an easily buildable source package, and i hope that it could somewhat help you (yes, YOU :P) to make a beautiful theme that will make vista and osx to look as they are coming straight from the 80’s (well even if it’s a very little help :D)

You can download it here (also a kde-look page here) or from KDE’s svn in /playground/plasma/applets/svgpaneltest

Some notes:

To build it a KDE4 developing environment is needed (see the techbase article)
at least KDE 4.0.2 is required, but a recent svn snapshot is preferred.

A plasma restart could be needed to see it listed among the plasmoids, or you can also start it with the command
plasmoidviewer svgpaneltest
or, with a very recent svn snapshot (from some minutes ago actually :P)
plasmoidviewer svgpaneltest /path/to/your/theme.svg

On device notifier again


Another post on devicenotifier :), so let me introduce his shiny new look:
new devicenotifier
The code derives directly from the kickoff delegate (with some fixes to RTL layouts), but the interesting part is that it has been pushed in libplasma, so all listviews in plasma that works like a menu can use it and have a consistent look (At the moment kickoff is still independent but i will port it shortly)

This will make possible for third party applets that wants to have a listview/menu that is well integrated into plasma without much hassle.
To use it you must use the new Plasma::Delegate class (or a subclass of it) and either use the roles that Plasma::delegate defines or if you can’t modify the model, use its function setRole(internalrole, yourrole) to map a role of the model to a role of Plesma::Delegate

If you want to paint additional data into an item you can subclass the delegate, and in the paint function calling Plasma::Delegate::paint and then paint the additional things in the space left empty that you can retrieve with the functions rectAfterTitle, rectAfterSubTitle and emptyRect.

That’s it πŸ˜€