[lazarus] Black clBtnFace fix? was Patch for searchresults dialog

Tony Maro tony at maro.net
Sat Nov 22 16:26:58 EST 2003


Bob Wingard wrote:

>  I am running Mandrake 9.2 and have not seen the problem yet and I have
>tried several themes. I have not downloaded any additional themes so I
>am just using the stock KDE themes installed with Mandrake. I spend most
>of my time in Gnome rather than KDE. I will run KDE for a few days and
>see if I can re-create the problem.
>  
>
Remember I'm a GTK noob, but maybe this will help.  I pulled some GTK 
theme info from within my app and did some testing.

Inside GetSysGCValues (from GTKProc.inc,) the color is set to the 
CORRECT value using:
    Result.foreground := Style^.bg[GTK_STATE_NORMAL];

However, it reaches the following code at the end of that routine and 
zero's the value:

  if (style <> nil) then
    if  (style^.colormap <> nil) then
      gdk_colormap_query_color(style^.colormap,result.foreground.pixel, 
@result.foreground)
    else
      
gdk_colormap_query_color(gdk_colormap_get_system(),result.foreground.pixel, 
@result.foreground);

I looked up the gdk_colormap_query_color function and found this on 
Gnome's site:
"This function is rarely useful; it's used for example to implement the 
eyedropper feature in GtkColorSelection 
<http://developer.gnome.org/doc/API/2.0/gtk/GtkColorSelection.html>."

So I have no idea what the goal is with it...

If I add an exit after the Result.foreground line, everything works 
great.  But, I dunno what else this might break...

-Tony






More information about the Lazarus mailing list