[Lazarus] clDefault propagation

Howard Page-Clark hdpc at talktalk.net
Tue Apr 26 21:58:42 CEST 2011


On 26/4/11 8:35, Mark Morgan Lloyd wrote:
> I've got a form F, at the top of which is a status bar T. At the bottom
> is a panel B containing status bars B1 and B2. The status bars and panel
> are all set to clDefault.
>
> On 0.9.28, the status bars are all grey.
>
> On 0.9.30, the top status bar T is grey, while the bottom status bars B1
> and B2 inherit their colour from B which in turn inherits it from the
> form F (which is, unfortunately, black).
>
> Is this to be expected?
>
In a forum reply Zeljko recently wrote:
"clDefault is default color of wincontrol provided by widgetset theme.
Look at qt implementation (TQtWidget.Palette).
TQtWidget.Palette is initialized before LCL changed any color to handle 
and it contains default QPalette for
that widget under it's current QStyle.
We decided to introduce clDefault to get all mighty color themes work, 
before that eg. TCustomPanel default color was clBtnFace, but when you 
look that from Qt side , that's wrong since clBackground is correct 
color for TCustomPanel, same for TCustomForm, it was clBtnFace, but 
clForm is color which should be there. To avoid problems with 
ParentColor property (if we change wincontrol default color as ws 
proposed), clDefault is here - default color for all wincontrols is 
clDefault and that's it."

So I think you're seeing the difference between clBtnFace (earlier) and 
clDefault (now).

Howard




More information about the Lazarus mailing list