RFR: 8323511: Scrollbar Click jumps inconsistent amount of pixels [v6]
Johan Vos
jvos at openjdk.org
Thu May 9 17:37:04 UTC 2024
On Thu, 9 May 2024 14:49:26 GMT, Florian Kirmaier <fkirmaier at openjdk.org> wrote:
>> As seen in the unit test of the PR, when we click on the area above/below the scrollbar the position jumps - but the jump is now not always consistent.
>> In the current version on the last cell - the UI always jumps to the top. In the other cases, the assumed default cell height is used.
>>
>> With this PR, always the default cell height is used, to determine how much is scrolled.
>> This makes the behavior more consistent.
>>
>> Especially from the unit-test, it's clear that with this PR the behavior is much more consistent.
>>
>> This is also related to the following PR: https://github.com/openjdk/jfx/pull/1194
>
> Florian Kirmaier has updated the pull request incrementally with one additional commit since the last revision:
>
> JDK-8323511: Adjust javadoc of the getViewportLength()
I did a number of tests with the new approach. It works as expected, and I don't see scenarios that could lead to a performance issue.
FWIW, this is a rather drastic change to the behavior, but there are no technical reasons to not do it. There are currently no tests that assert the current behavior, and I didn't find it in the public docs either (the idea about mapping scroll events to the top/bottom of a cell is hinted in the code though).
It is very likely that existing application will behave differently after this PR. But I think that is more a UX discussion than a code discussion.
-------------
PR Comment: https://git.openjdk.org/jfx/pull/1326#issuecomment-2103108966
More information about the openjfx-dev
mailing list