RFR: 8343336: Add persistentScrollBars preference [v6]

Kevin Rushforth kcr at openjdk.org
Wed Nov 27 13:16:49 UTC 2024


On Wed, 27 Nov 2024 00:26:16 GMT, Michael Strauß <mstrauss at openjdk.org> wrote:

>> This PR adds another accessibility preference that is available on all supported desktop platforms:
>> 
>> 1. **Windows**: Settings -> Accessibility -> Visual Effects -> Always show scroll bars
>> 2. **macOS**: System Settings -> Appearance -> Show scroll bars
>> 3. **Ubuntu**: Settings -> Accessibility -> Seeing -> Always show scroll bars
>> 
>> When the OS setting is changed, all platforms report updates that can be observed in JavaFX.
>> The manual test application `test/manual/events/PlatformPreferencesChangedTest` can be used to test the feature.
>
> Michael Strauß has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains six additional commits since the last revision:
> 
>  - Merge branch 'master' into feature/accessibility-hide-scrollbars
>  - check whether gtk-overlay-scrolling exists
>  - Merge branch 'master' into feature/accessibility-hide-scrollbars
>  - add platform keys to javadoc
>  - Change reducedScrollBars to persistentScrollBars
>  - Add reducedScrollBars preference

The warning is gone on my Ubuntu 16.04 system. I note that the `GTK.overlay_scrolling` preference is not reported on that system (which seems fine) and that the `persistentScrollBarsProperty` is always `false`. Everything still works as expected on systems with a newer GTK.

modules/javafx.graphics/src/main/native-glass/gtk/PlatformSupport.cpp line 125:

> 123:         putBoolean(env, prefs, "GTK.enable_animations", enableAnimations);
> 124: 
> 125:         if (g_object_class_find_property(G_OBJECT_GET_CLASS(settings), "gtk-overlay-scrolling")) {

Looks good, presuming that we want the property to be absent on systems that don't support this setting.

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

Marked as reviewed by kcr (Lead).

PR Review: https://git.openjdk.org/jfx/pull/1618#pullrequestreview-2464979642
PR Review Comment: https://git.openjdk.org/jfx/pull/1618#discussion_r1860633975


More information about the openjfx-dev mailing list