RFR: 8323511 Scrollbar Click jumps inconsistent amount of pixels [v2]

Marius Hanl mhanl at openjdk.org
Mon Feb 5 09:56:08 UTC 2024


On Mon, 15 Jan 2024 08:31:59 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
>   reverted accidental indentation chang

modules/javafx.controls/src/main/java/javafx/scene/control/skin/VirtualFlow.java line 1556:

> 1554:         if (targetCell != null) {
> 1555:             if (targetIndex < 0) {
> 1556:                 T cell = getCell(targetIndex);

Is there a reason you call `getCell` here, but `getAvailableCell` below?

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

PR Review Comment: https://git.openjdk.org/jfx/pull/1326#discussion_r1477922425


More information about the openjfx-dev mailing list