[Lazarus] RegisterWSComponent documentation?

Dmitry Boyarintsev skalogryz.lists at gmail.com
Wed Nov 11 22:34:23 CET 2020


On Wed, Nov 11, 2020 at 3:31 PM Zoƫ Peterson via lazarus <
lazarus at lists.lazarus-ide.org> wrote:

> Personally I need the new behavior for any TCustomControl descendant, so
> I'd put most of the code in TCocoaWSCustomControl, but we have our own
> TUiTreeView/TUiCustomControl classes already, so I can add the extra
> configurability we'd need there.
>
I'd suggest to address the issue in the same manner as NSCell-based vs
NSView-based tables were.
Just add another complication condition into Cocoa-widgetset.

The use of NSViualEffectView cannot be hard in Cocoa, as LCL claims to
support back to 10.5.8 (or at least 10.6)
(There are still some PowerPC Lazarus users)

The biggest concern I'd have with it being pushed into LCL proper is
> that FillRect(clWindow) doesn't look right.  The NSViualEffectView
> changes color based on the average color of the desktop wallpaper behind
> the window and shifts as you move the window around, so none of the
> NSColors can match it.  I had to adjust our owner draw functions to not
> rely on drawing an opaque rectangle to clear/overwrite things, but it
> wasn't too bad.
>

This is actually a LCL change, rather than Cocoa change.
What you might want to do is to add another Widgetset compatibility flag
(TLCLCapability) to indicate on how the background of TreeView
should/should not be drawn. Using fancy effects is becoming a new norm (for
any platform), so it might be handy in future for others (i.e. Qt5)

One might argue that TLCLCapability is not the right place for that, and
instead Themes class should be used.
I personally don't have an opinion about that.

After all, you're dealing with a problem that surpassed Win9x User
Interface :)
Thus, it's not a surprise for LCL not to have enough information to address
the problem.

thanks,
Dmitry
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20201111/a70b7865/attachment.html>


More information about the lazarus mailing list