On Thu, 4 Jun 2026 19:06:29 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
>> 
>> For controls whose animation can be toggled by developers, it is useful to 
>> think of the `animated` property as the application choice, while 
>> `reducedMotion` is the user choice.
>> 
>> ---------
>> - [x] I confirm that I make this contribution in accordance with the 
>> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai).
>
> Michael Strauß has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   review comment

I will review and test tomorrow. 
`reducedMotion` should be `true` when I disable `Visual effects -> Animation 
effects` under Windows 11, right?

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

> 195:     /** {@inheritDoc} */
> 196:     @Override public void dispose() {
> 197:         cancelTransitionAnimation();

Should we cancel animations in other skins as well? Or is there only a need 
here?

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

PR Comment: https://git.openjdk.org/jfx/pull/2177#issuecomment-4625589838
PR Review Comment: https://git.openjdk.org/jfx/pull/2177#discussion_r3358508201

Reply via email to