JDK-8267546 : Add CSS themes as a first-class concept
  • Type: Enhancement
  • Component: javafx
  • Sub-Component: scenegraph
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2021-05-21
  • Updated: 2022-12-13
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
tbdUnresolved
Description
Currently, the two themes shipped with JavaFX (Caspian and Modena) are implemented as a set of stylesheets and some internal logic, mostly in `PlatformImpl`.

Much of this logic deals with optional features or platform-specific theme modifications. Another piece of logic deals with accessibility themes: on Windows platforms, both Caspian and Modena have high-contrast stylesheets that are added or removed in response to OS theme changes.

A major downside of this implementation is that it special-cases the built-in themes and doesn't offer enough extension points to make it easy for developers to create new rich themes. A first-class theme API should be added to JavaFX that allows developers to extend the built-in themes, and create new themes that can respond to OS-level preferences like dark mode or accent colors.
Comments
A pull request was submitted for review. URL: https://git.openjdk.org/jfx/pull/511 Date: 2021-05-21 04:30:28 +0000
09-11-2022