RFR: 8334874: Horizontal scroll events from touch pads should scroll the TabPane tabs

Andy Goryachev angorya at openjdk.org
Mon Jun 24 19:39:14 UTC 2024


On Mon, 24 Jun 2024 18:05:09 GMT, Jose Pereda <jpereda at openjdk.org> wrote:

> This PR considers the horizontal scroll events that can be generated on a trackpad, on an horizontally sided `TabPane` control (top or bottom), adding to the existing vertical scroll events from mouse wheel and trackpad, to scroll its tabs.
> 
> Therefore, scrolling a `TabPane` will behave in the same way that `ScrollBar` does regarding those same events and control orientation (vertical/horizontal).

Considering that this is an improvement and a change in behavior, I would like to suggest a couple of changes:

1. For Side.LEFT/RIGHT, reverse the direction.  What we have now is inconsistent with the movement of e.g. ListView (can be seen if using track pad with the list view and TabPane in the Monkey Tester):

![Screenshot 2024-06-24 at 12 32 18](https://github.com/openjdk/jfx/assets/107069028/92aacb1b-c8b8-4ed0-bd9f-b787292b5e6b)

2. Since now the TabPane movement correctly reflects the orientation of track pad gesture, we need to reverse the movement when TabPane effective nodeOrientation is RTL.

3. We don't have the behavior documented currently (some initial docs can be found in /doc-files/behavior).  Maybe it's a good opportunity at least start a file for TabPane?

And, a question - does this change require a CSR, since we are changing the behavior?

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

PR Comment: https://git.openjdk.org/jfx/pull/1486#issuecomment-2187272193


More information about the openjfx-dev mailing list