On Fri, 10 Jul 2026 20:22:28 GMT, Michael Strauß <[email protected]> wrote:
> The closest thing to `StageBackdrop` is `Paint`: it's a configurable object > that describes some visual appearance. Most paints are immutable, but > `ImagePattern` is mutable when it represents an animated image. Paints are > reusable within a scene and across multiple scenes, so when you say sharing > configuration objects is neither intuitive nor useful, you're arguing against > prior art. I don't see anything mutable in an `ImagePattern` that references an animated `Image`. > Paints are reusable within a scene and across multiple scenes, so when you > say sharing configuration objects is neither intuitive nor useful, you're > arguing against prior art. I was making a cost/benefit case and arguing that the benefit was zero. You haven't said anything to change my mind on the benefit = zero part. And I don't see prior art here; JavaFX avoids sharing mutable objects whenever possible. I can imagine changing the API so the client creates the StageBackdrop instead of the Stage. Assigning the same backdrop to multiple stages would still be prohibited as opposed to the current API where it's impossible. > I'm not ready to "disagree and commit" to your proposal, but I hope that > other people will join the discussion to move it forward. I hope so, too. > Still I think we should, where possible, respect the JavaFX-level setting and > remove the transparent backdrop material. If an application wants to create a UI with reduced transparency wouldn't they just avoid using backdrops in the first place? I'm not that familiar with the preferences API but I thought it was the app developer's job to respond to these settings. This preference can change on the fly but I'm not sure we can respond by making the OS backdrop come and go (that's why it's an init call). We can do this on Mac and Win11 using D3D9 but I'm doubtful about the D3D12 backend and Linux is a big unknown. If a client wants reduced transparency outside the OS setting they could just not use backdrops or cover the backdrop with an opaque fill. I don't think the JavaFX core code can do much better than that. ------------- PR Comment: https://git.openjdk.org/jfx/pull/2048#issuecomment-4959917978
