On Thu, 22 Jan 2026 18:50:48 GMT, Martin Fox <[email protected]> wrote:
>> Should we have a (new kind of) fallback system, or should we do this with >> the existing `Platform.isSupported(ConditionalFeature)` and have the user >> decide based on the result of that function? > > I agree that an enum is inadequate. The two API's we have to work with (macOS > and Win11) are based on enums; you specify the type of window or content > (e.g. tooltip, menu, sidebar, window) and let the OS decide what material to > use. macOS pro-actively enumerates a lot of different window types though it > looks like many of them map to the same material under the hood. I'm not > entirely sure the glass effect recently added to macOS is appropriate for > JavaFX but it is a prime example of a specialized platform-specific backdrop > that can't easily be squeezed into an enum. > > So, yes, we should expand StageBackdrop so we can provide more information. > How to do that might be beyond my pay grade (I'm not a Java expert). I don't > think the existing `Platform.isSupported()` API would be appropriate since it > takes a separate enum type. > Should we have a (new kind of) fallback system, or should we do this with the > existing `Platform.isSupported(ConditionalFeature)` and have the user decide > based on the result of that function? Expanding on that question: if we have platform-specific backdrops that may have a big impact on styling and readability, stylesheets may want to query the actual backdrop used via media queries. ------------- PR Review Comment: https://git.openjdk.org/jfx/pull/2048#discussion_r2718194820
