Using the selected text color in the date picker

Reinhold Kainhofer reinhold at kainhofer.com
Tue Mar 30 23:06:17 BST 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Maks Orlovich wrote:

> On Thursday 25 March 2004 06:17 am, Reinhold Kainhofer wrote:
>> Attached is a patch that fixes the KDateTable to use the correct text
>> color for the selected text. So far, it always used white (hardcoded) for
>> the selected day, even if the system-wide color setting used a light
>> selection color and a dark selected text color. This was reported as bug
>> 78162 for korganizer, but is a general date picker bug.
>>
>> Okay to apply the patch and close the report?
[...] 
> There is actually more stuff broken than that --- thinks like:
>      painter->setPen(KGlobalSettings::highlightColor());
>      painter->setBrush(KGlobalSettings::highlightColor());
> 
> are technically wrong, as they breaks palette inheritance (and for that
> matter disabling); this should not be using KGlobalSettings but rather
> colorGroup().highlight(), etc.

Okay, so here is another patch that tries to implement using the color scheme 
in the date table. Now disabling also works (although the background color 
stays white, I'd prefer a light gray like with line edits).
The only problem is the use of KGlobalSettings::activeTitleColor() in the 
header row of the table. I didn't find any other way to get the color of the 
window title bars.
Also, the days of the previous/next months are now printed in 
colorGroup()->mid(), so that it looks lighter then colorGroup()->text(), but 
is still readable on white (brightText() is not readable, as it prints in 
white). Is there any way to get the color of disabled texts (like of a 
disabled line edit)?

Okay to commit, or do you have any objections?

Reinhold
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFAae9ZTqjEwhXvPN0RAhOrAJ90qel9TMpgmN/Uf3JB7PNu0fTRDwCbBQnn
K5zxIbL4unildyCcgWxahhw=
=BrT5
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 2004-03-30_DateTableUseColorScheme.patch
Type: text/x-diff
Size: 4278 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20040331/2d421bbf/attachment.patch>


More information about the kde-core-devel mailing list