[Kde-pim] KMail auto-lighted icon

Jakob Petsovits jpetso at gmx.at
Wed Dec 5 06:16:28 GMT 2007


Hi list,

here's a slight adaption of KMSystemTray that doesn't require a "kmail-light" 
icon to exist, but instead takes the existing icon and transforms it so that 
it gets a bit lighter for the blue (hardcoded! evil!) text to be readable.
Not made transparent, as that could hurt with dark backgrounds.
That patch (kmail-autolight-icon.diff) looks quite good for both light and 
dark base icons, as long as the background is light.

For all of that to work with all combinations of light and dark backgrounds as 
well as light and dark number text, one has to be more carefully as the 
amount of possible combinations is much higher. I had a go at it, and tried a 
lot of stuff out, the second attached patch (kmail-autotransparent-icon.diff) 
is the result of that.

It fiddles a bit with various KIconEffect calls, but that keeps us from using 
qimageblitz as additional dependency, and still looks ok. I tested with 
various different icons ("kmail", and "kde" as representative dark icon), and 
with different color schemes. I placed readability of the unread mails number 
(in all cases) over having good sight at the icon, if you would prefer a more 
solid icon for less readability in some cases then remove the second (=last) 
occurrence of the line

KIconEffect::semiTransparent( overlayImage );

It seems the transparency bug that was described in the extensive comment is 
gone as well, works now by just painting on the QPainter. (It's been a long 
time since 2003.)

So that's that, you might want to apply one of those patches in the one or the 
other form.

When fiddling with KColorScheme, I also tried to assign the colors in there to 
the mail view colors, see the third patch for that. 
(kmail-custom-colors-kcolorscheme.diff) No idea if you like that or not -
it's certainly cleaner and more generally applicable, but you still need to 
enable "Custom Colors" to get a color scheme that is roughly compatible to 
current KDE defaults. Also, it hasn't got that characteristic red/blue 
distinction between new and unread mails as it uses active and visited link 
text colors. Know that I'm totally indifferent on that issue.

Non-custom-colors settings are still hardcoded, and maybe that should be 
fixed, however I am not going to work more on that particular issue. Rather 
than that, I'll try to fix those obnoxious mail icons.

Wishes,
  Jakob

P.S.: Please CC me, I'm not subscribed to kde-pim.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kmail-autolight-icon.diff
Type: text/x-diff
Size: 591 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20071205/350cf5bb/attachment.diff>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kmail-autotransparent-icon.diff
Type: text/x-diff
Size: 6929 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20071205/350cf5bb/attachment-0001.diff>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kmail-custom-colors-kcolorscheme.diff
Type: text/x-diff
Size: 3233 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20071205/350cf5bb/attachment-0002.diff>
-------------- next part --------------
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/


More information about the kde-pim mailing list