[lazarus] Black clBtnFace fix? was Patch forsearchresults dialog

Andrew Johnson acjgenius at earthlink.net
Sat Nov 22 18:04:47 EST 2003


Coul you try adding a test? This will not work for gtk2 because gtk2 is
different but if you add a test that does something like this -

if (result.foreground.pixel = 0) and ((result.foreground.red <> 0) or
(result.foreground.blue <> 0) or (result.foreground.green <> 0)) then
  if (style <> nil)
	.....

it _might_ fix it for when the color already has a valid pixel.

which sounds like in this case it is.

Andrew

On Sat, 2003-11-22 at 17:50, Tony Maro wrote:
> Andrew Johnson wrote:
> 
> >this shouldn't be a problem. theoretically the bg will always have a
> >valid rgb value, but it will not always have a valid pixel.
> >
> >gc's must have a color with a valid pixel, so we query just in case. I
> >have no idea why the gc would not be initialized or might be being
> >queried wrong, but it certainly sound a bit odd.
> >
> >I am guessing sometimes in kde the colormap passed is not the right one
> >or some such wierdness so querying fails.... but I don't know for sure.
> >cause it works for me fine when I tried to go into kde so...
> >
> >Andrew
> >  
> >
> Well, this causes bug #153, #94 and another one or two other reports 
> I've see on the list.
> 
> The style^.colormap is not nil and the foreground.pixel value returned 
> by these is zero, when it's btnface or anything - and it works 
> flawlessly on my system making me wonder if that's being used at all.  
> In fact, this isn't used until the theme is actually used to draw the 
> data on the screen, correct?  And since on mine, the pixel is always 
> zero, I'm guessing it's not being used at all.
> 
> Anything you want me to look for?
> 
> -Tony
> 
> _________________________________________________________________
>      To unsubscribe: mail lazarus-request at miraclec.com with
>                 "unsubscribe" as the Subject
>    archives at http://www.lazarus.freepascal.org/mailarchives






More information about the Lazarus mailing list