Lazarus

Programming => Widgetset => GTK => Topic started by: AlexTP on November 09, 2018, 08:35:05 pm

Title: Back color of TPanel not equals to back color of Form
Post by: AlexTP on November 09, 2018, 08:35:05 pm
I post screenshot of About window with TButtonPanel component.
If using color picker - you ll see that TBUttonPanel back color not the same as form color.
How to fix?
Ubuntu 18.4 x64.
Title: Re: Back color of TPanel not equals to back color of Form
Post by: Blaazen on November 09, 2018, 09:14:53 pm
TButtonPanel is TCustomPanel descendant, I guess TPanel has also different color than TForm. Maybe it depends on color settings of your system.
Title: Re: Back color of TPanel not equals to back color of Form
Post by: lainz on November 09, 2018, 10:13:47 pm
Use two panels?
Title: Re: Back color of TPanel not equals to back color of Form
Post by: howardpc on November 09, 2018, 11:10:42 pm
Mint 19, FPC3.2.0, Laz 2.1.0 does not show this color discrepancy (which is mysterious in your case, since TCustomPanel's constructor sets ParentColor to True).
Title: Re: Back color of TPanel not equals to back color of Form
Post by: lucamar on November 10, 2018, 12:43:36 am
Check in the Object Inspector whether the Color property of the TButtonPanel is set to anything other than clDefault; barring bugs in the LCL, that's AFAIK the only way you could be seeing that effect.

FWIW, it works OK here: Kubuntu 14.04, Lazarus 1.8.4-GTK2.
Title: Re: Back color of TPanel not equals to back color of Form
Post by: AlexTP on December 13, 2018, 08:57:30 am
Of course, ButtonPanel's color is clDefault (no line in LFM file).
TinyPortal © 2005-2018