[lazarus] New IDE bugs ?
Tony Maro
tony at maro.net
Sun Nov 23 16:13:38 EST 2003
Mattias Gaertner wrote:
>On Sun, 23 Nov 2003 13:26:46 +0100 Vincent Snijders <vslist at zonnet.nl>
>wrote:
>
>
>
>Each system color is a special case. clBtnFace needs a different trick than
>clWindow.
>
>In this case the problem is the following:
>
>TListBox.OnDrawItem paints with clWindow to paint in the background color of
>the inner area. A TListBox is in the gtk a gtk_list with a list of
>gtk_list_item. The paint DC is that of the item, while the background is
>hardcoded in the gtk as the base[Normal_State] of the gtk_list.
>
>This technique is common in the gtk. The best solution would be to retrieve
>the current background of the gdkwindow of the gtk_list_item, so we don't
>have to bother about the specific widget class. But I'm still searching for
>such function.
>
>If I don't find it, I will add a gtk_list_item specific solution.
>
>
>Mattias
>
>___________________
>
Right, but the fix Andrew posted should work because the offending code
is the code he's fixing, and is called after all of the other color
types. I don't have a moment to install and test it, but I know that
when I added an exit before this little offending routine, everything
including the build dialog in Lazarus was fixed.
I've got to run back to church and in another couple of hours will
install the fix as suggested and test all the cases I've seen, which
include the Lazarus build dialog, drawing on canvas with standard system
related colors, and the TStaticText control.
But what you've mentioned does explain why form backgrounds and others
would display correctly instead of black and may be an entirely separate
yet related issue.
Thanks,
Tony
More information about the Lazarus
mailing list