Juha,

On 11/11/20 3:48 AM, Juha Manninen via lazarus wrote:
FYI, the TTreeView in LCL is custom drawn. It does not map to a native widget unlike LCL controls typically do.

See my reply to Dmitry for the details, but the short answer is that I already have everything working. It's just all in our own classes that descend from the widgetset ones.

I don't know if/when the behavior changed, but modern versions of macOS do not treat NSView (aka HWND) as opaque. If you don't draw anything, the parent shows through without you having to tell it to. In dark mode, even things like TEdit are translucent. As long as the TTreeView doesn't do a fillRect(ClientRect), everything is drawn correctly.

NSVisualEffectView itself isn't transparent. It's a hardware accelerated surface that takes advantage of the GPU compositing to draw. You can put one on top of a bunch of other opaque controls, tell it to show what's behind the window, and it will make it seem like the desktop is peaking through without the opaque controls being visible. There's actually a flag for "Show what's behind the window" or "Show what's behind the view" that controls that.

--
Zoë Peterson
Scooter Software

--
_______________________________________________
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus

Reply via email to