On Thu, 28 May 2026 00:24:58 GMT, Michael Strauß <[email protected]> wrote:

> Several JavaFX controls use animations to convey state changes, some of which 
> are controllable by developers (for example: `TitledPane.animated` or 
> `Chart.animated`). However, none of those controls respect the 
> `reducedMotion` preference that was introduced with 
> [JDK-8341514](https://bugs.openjdk.org/browse/JDK-8341514).
> 
> This enhancement changes the behavior of the following control skins to take 
> the `Scene.Preferences.reducedMotion` preference into account when 
> determining whether to animate a state change:
> 
> * `TableRowSkinBase`
> * `TitledPaneSkin`
> * `TabPaneSkin`
> * `PaginationSkin`
> * Charts
> 
> ---------
> - [x] I confirm that I make this contribution in accordance with the [OpenJDK 
> Interim AI Policy](https://openjdk.org/legal/ai).

modules/javafx.controls/src/main/java/javafx/scene/control/skin/TitledPaneSkin.java
 line 298:

> 296:             transitionStartValue = getTransition();
> 297:             doAnimationTransition();
> 298:         } else {

I'm wondering if we should also check here if the `timeline` is valid and if it 
is cancel it. Is there a chance `reducedMotion` could be changed to false while 
we are midway through animating the transition?

-------------

PR Review Comment: https://git.openjdk.org/jfx/pull/2177#discussion_r3317773250

Reply via email to