[lazarus] clBtnFace coming up black, regardless

Andrew Johnson acjgenius at earthlink.net
Sun Nov 9 07:34:09 EST 2003


I believe a few weeks ago I changed the BtnFace color to actually be the
_Button_ face color. Aka if it is black thats the literal color of your
button. Which can only mean you're using a pixmap theme afaik, and
probably one which is inherently "broken" but whose brokenness doesn't
cause problems in native widgets since they will directly call to the
pixmap engine bypassing style colors entirely.

This is again where win32 compatibility and functions bite. I have not
completely figured out what to do, though I started one solution of if
using rectangle or fillrect with clForm it tries to call the theme
function.

I am tempted to disallow "system" colors in general draw routines and
supply some themed interface functions which interface XP functions on
XP, simply do basic fill or draw line on 9x/2k/nt, and call the
gtk_paint_* routines under gtk+. aka you wouldn't be able to use any
system colors on any canvas at all you would have to do things like you
would in real gtk, flat box fill or drawbox or.... whatever it might be.
however the real functions get chosen.

No matter which way I change this value or behaviour currently something
is going to be wrong or broken, because GTK simply doesn't work the same
way as win32 nor vica-verca. The reason I changed it was because of that
very reason.. I saw brokenness in several themes. LCL should not have to
choose between different kinds of brokenness. :(

Andrew

On Sun, 2003-11-09 at 03:12, Tony Maro wrote:
> I just noticed that on my system clBtnFace when used to draw on a 
> canvas, always draws black.  It displays fine inside the IDE, but after 
> compile clBtnFace and clBtnShadow are both black.
> 
> The other colors seem to work fine.






More information about the Lazarus mailing list