[Kstars-devel] KLed::setColor() not working?

Jason Harris kstars at 30doradus.org
Sun Jun 27 22:47:19 CEST 2004


Hello,

In KStars, we indicate the status of a connection with an external 
device using the color of a KLed object (i.e., grey=inactive, 
green=connected, red=error).  We recently noticed that these LEDs are 
no longer working as they used to, and traced it to the commit on 21 
May ("antialiasing of round LED shapes" ).  Before this commit, our 
LEDs change color; after this commit, they are always grey.

I put together a very small test program that illustrates the problem:
http://www.30doradus.org/LEDtest.tar.bz2

If you compile this against latest kdelibs, then pressing the "Change 
Color" button does nothing.  

If you add the line:
  light->setShape( KLed::Rectangular );

to the TestWidget ctor, then the LED changes colors properly.  Also, if 
you downgrade kled.h to 1.29 and kled.cpp to 1.28 (the versions 
directly prior to the 21 May commit) and use the libkdeui generated 
from them, then the LED changes color properly, even when it is 
Circular.

Seems to be a bug in KLed, but I'm not familiar enough with that code to 
see the problem immediately.

kind regards,
Jason

-- 
KStars: A KDE Planetarium
http://edu.kde.org/kstars


More information about the Kstars-devel mailing list