[PATCH] KStyle changes

Rafael Fernández López ereslibre at gmail.com
Fri Apr 27 02:37:33 BST 2007


Hi,

I have been hacking with KStyle. After some attempts, I think I have the
best solution, and the cleanest one. The idea is that categories at
KListView can be drawn by KStyles, as well as item joining (that will come
later). The patch I attach is only for categories, and is not fully finished
(still need to call to sizeFromContents).

KListView when drawing categories will check if what we have is a KStyle or
not. If we have, it will call directly to drawControl. On the other hand, if
what we have is a QStyle, it will go and draw a by-default category, as
before.

As you see on the patch I've done dummy changes to plastik theme. Just for
testing reasons.

Why this solution is nice ?

- We can extend ControlElement to our needs. If needed. (needed for
categories and joining items, probably tomorrow for something else
elsewhere).
- We keep separated QStyle and KStyle on our methods (drawControl).

Other solutions drove me to some problems... but this one seems to be the
cleaner and the best one.

Waiting for your comments.


Bye and thanks,
Rafael Fernández López.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20070427/b65863f8/attachment.htm>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: style.diff
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20070427/b65863f8/attachment.ksh>


More information about the kde-core-devel mailing list