[Lazarus] clDefault propagation
Mark Morgan Lloyd
markMLl.lazarus at telemetry.co.uk
Tue Apr 26 23:16:41 CEST 2011
Howard Page-Clark wrote:
> 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).
In that case, why is the status bar at the top of the form grey and the
ones at the bottom black (as dictated by their grandparent)? They're all
set to clDefault and other relevant properties are the same, so I'd
expect them to look the same.
Looking at this from the point of view of sorting the problem rather
than understanding the behaviour, what colour should a status bar be set
to so that it adopts the colour of the main menu background?
--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk
[Opinions above are the author's, not those of his employers or colleagues]
More information about the Lazarus
mailing list