Sorry, here is the patch ; )

On Sat, May 31, 2008 at 12:41 AM, Percy Camilo Triveņo Aucahuasi <orgyforever@gmail.com> wrote:
Hi all, when I change the color style of my desktop, then the simbols in KSudoku dissapears, check this screenshots:

Default look:
http://www.imagehosting.com/show.php/1769977_whitewndcolorsettings.png.html

Problem:
http://www.imagehosting.com/show.php/1769975_blackwndcolorsettings.png.html


This patch solved that problem. This is the screenshot with the patch:

http://www.imagehosting.com/show.php/1769976_solved.png.html

In the patch I'm using this lines to obtain the base color of the window:

//********************************
KColorScheme systemColorScheme(QPalette::Active);
QColor baseWndColor = systemColorScheme.background(KColorScheme::NormalBackground).color();
int luminance = 0.2126*baseWndColor.red() + 0.7152*baseWndColor.green() + 0.0722*baseWndColor.blue();
if (luminance > (255 / 2.0))
// set the color font/brush to black
else
// set the color font/brush to white
//********************************

Is that ok? or there is a better way?

If it's ok ... may I commit? ; )

Cheers,
Percy

pd: btw I already reported: http://bugs.kde.org/show_bug.cgi?id=162832