Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2003-11

New IDE bugs ?

8 messages · 4 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Tony Maro
to Unknown author: There are (at least) 2 bugs which have crept in lately. They seem related, because the…
Mattias Gaertner wrote 27 lines
On Sun, 23 Nov 2003 13:26:46 +0100 Vincent Snijders 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

Reply by email

Vincent Snijders
to Unknown author: There are (at least) 2 bugs which have crept in lately. They seem related, because the…
Show quoted text 26 lines
On Sun, 23 Nov 2003 12:16:54 +0100 (CET) wrote: > Hi, > > There are (at least) 2 bugs which have crept in lately. They seem > related, because the symptoms are the same. > > - Configure 'Build lazarus' dialog: The grid with descriptions > (or whatever component it is) is completely black (but > build/skip/install icons are shown) and only the current > selection is shown in white letters. > > - 'Find in files' search result: everything is black in the > memo/whatever, > > only the current selection is printed in white letters. > > This is from todays CVS update, compiled with a 1.0.10 version of > FPC. Both are TListBox and both are drawing the background with clWindow. Let's see .. Mattias

FYI, this is the same as bug 153. Please also take a look at what Tony and Andrew were discussing in the "Black clBtnFace fix? was Patch for searchresults dialog" thread.

I wanted to try Andrew's suggestion, but couldn't find the exact place to put the code.

Vincent.

Vincent.

Reply by email

Unknown author

Hi,

There are (at least) 2 bugs which have crept in lately. They seem related, because the symptoms are the same.

- Configure 'Build lazarus' dialog: The grid with descriptions (or whatever component it is) is completely black (but build/skip/install icons are shown) and only the current selection is shown in white letters.

- 'Find in files' search result: everything is black in the memo/whatever, only the current selection is printed in white letters.

This is from todays CVS update, compiled with a 1.0.10 version of FPC.

Michael.

Reply by email

Tony Maro
to Unknown author
Mattias Gaertner wrote 19 lines
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.

The suddenly black controls are definately fixed with the code Andrew and I were working on. The black is generated because of a bug in the GetSysGCValues routine that mistakenly wrote on top of the returned converted system color with a zero _after_ it had already figured out the correct color.

Not to say more custom widget handling didn't need added as well.

Tony Maro Systems Consultant The Maro Group (256) 337-5759 http://www.maro.net/

Reply by email

Mattias Gaertner
to Unknown author: There are (at least) 2 bugs which have crept in lately. They seem related, because the…
Show quoted text 15 lines
Hi, There are (at least) 2 bugs which have crept in lately. They seem related, because the symptoms are the same. - Configure 'Build lazarus' dialog: The grid with descriptions (or whatever component it is) is completely black (but build/skip/install icons are shown) and only the current selection is shown in white letters. - 'Find in files' search result: everything is black in the memo/whatever, only the current selection is printed in white letters. This is from todays CVS update, compiled with a 1.0.10 version of FPC.

Both are TListBox and both are drawing the background with clWindow. Let's see ..

Mattias

Reply by email

Mattias Gaertner
to Unknown author: There are (at least) 2 bugs which have crept in lately. They seem related, because the…
Show quoted text 56 lines
On Sun, 23 Nov 2003 13:26:46 +0100 Vincent Snijders wrote: > On Sun, 23 Nov 2003 11:43:01 +0100 > Mattias Gaertner wrote: > > > On Sun, 23 Nov 2003 12:16:54 +0100 (CET) > > wrote: > > > > > Hi, > > > > > > There are (at least) 2 bugs which have crept in lately. They seem > > > related, because the symptoms are the same. > > > > > > - Configure 'Build lazarus' dialog: The grid with descriptions > > > (or whatever component it is) is completely black (but > > > build/skip/install icons are shown) and only the current > > > selection is shown in white letters. > > > > > > - 'Find in files' search result: everything is black in the > > > memo/whatever, > > > > > > only the current selection is printed in white letters. > > > > > > This is from todays CVS update, compiled with a 1.0.10 version of > > > FPC. > > > > Both are TListBox and both are drawing the background with clWindow. > > Let's see .. > > > > > > Mattias > > FYI, this is the same as bug 153. Please also take a look at what Tony > and Andrew were discussing in the "Black clBtnFace fix? was Patch for > searchresults dialog" thread. > > I wanted to try Andrew's suggestion, but couldn't find the exact > place to put the code. 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.

I added the gtk_list_item specific solution.

Mattias

Reply by email

Mattias Gaertner
to Unknown author: There are (at least) 2 bugs which have crept in lately. They seem related, because the…
Show quoted text 36 lines
On Sun, 23 Nov 2003 11:43:01 +0100 Mattias Gaertner wrote: > On Sun, 23 Nov 2003 12:16:54 +0100 (CET) > wrote: > > > Hi, > > > > There are (at least) 2 bugs which have crept in lately. They seem > > related, because the symptoms are the same. > > > > - Configure 'Build lazarus' dialog: The grid with descriptions > > (or whatever component it is) is completely black (but > > build/skip/install icons are shown) and only the current > > selection is shown in white letters. > > > > - 'Find in files' search result: everything is black in the > > memo/whatever, > > > > only the current selection is printed in white letters. > > > > This is from todays CVS update, compiled with a 1.0.10 version of > > FPC. > > Both are TListBox and both are drawing the background with clWindow. > Let's see .. > > > Mattias FYI, this is the same as bug 153. Please also take a look at what Tony and Andrew were discussing in the "Black clBtnFace fix? was Patch for searchresults dialog" thread. I wanted to try Andrew's suggestion, but couldn't find the exact place to put the code.

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

Reply by email

Unknown author
to Unknown author: There are (at least) 2 bugs which have crept in lately. They seem related, because the…
Mattias Gaertner wrote 18 lines
> 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. I added the gtk_list_item specific solution.

Checked. Bug seems fixed, in both dialogs.

Great, Thanks !

Michael.

Reply by email