KColorScheme changes, take 2 (was: KDE/kdebase/runtime/kstyles/oxygen)

Matthew Woehlke mw_triad at users.sourceforge.net
Wed Sep 5 18:36:02 BST 2007

(copy previous e-mail, but updated)

After taking a closer look at current KColorScheme users, it looks like 
correct use of state information needs one of two things (where "which 
one" depends on the user):

1: adjust{Fore,Back}ground, as in kdelibs/kate/utils/katesearchbar.cpp
2: KStatefulBrush, as in the change to Oxygen in the previous message

I would like to add both next Monday. Arto Hytönen has been porting a 
lot of KColorScheme users off of the old (deprecated) ctor, and I'm 
working with him to start getting some "proper use" patches prepared for 
some of these. Between us, I hope to also have some "sample ports" by 
Friday, which I will post as I get them, but I can give the following 
lists of known will-be-users now:

For 1: katepart
For 2: katepart, oxygen

...and I've seen at least one other example for each from lxr (I just 
don't have them handy right now).

I've also attached the patch against KColorScheme. KStatefulBrush is 
documented, adjust* isn't yet, but should be documented before Monday. 
Comments on the API appreciated; especially for adjust*, which I tried 
to make 'friendly' for restoring the colors later.

Also... should there be adjustPalette taking a KStatefulBrush? Should 
there be ONLY adjustPalette (which would require apps to always cache 
the brushes, or use lengthier calls to adjustPalette)? Should there be a 
KStatefulBrush ctor that takes a QPalette and QPalette::ColorRole (i.e. 
to make restoring from the original palette easier)?

(See also http://permalink.gmane.org/gmane.comp.kde.devel.core/45349)

A pool hall put up a sign in their front window that read: "Profound 
language prohibited within." I could just imagine some people discussing 
the meaning of life and being told to take it outside. -- Scott Adams
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kcs-helpers.patch
Type: text/x-patch
Size: 9657 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20070905/85b61a7f/attachment.bin>

More information about the kde-core-devel mailing list