RFR: 8323511: Scrollbar Click jumps inconsistent amount of pixels [v3]
Andy Goryachev
angorya at openjdk.org
Mon May 6 17:41:00 UTC 2024
On Mon, 6 May 2024 08:49:27 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: Fix scrolling when clicking the scrollbar track when only one cell is visible
I might have raised this question before. In my opinion, the scrolling in these virtualized views should be more or less equivalent to the scrolling in the ScrollPane. In other words, using thumb track to page down and then page up (or using PgUp/PgDn keys) should get the control to its original state, unless it hit the rail.
This is how it's currently works in MS Word (which isn't exactly a pinnacle of usability, but something a lot of people across the globe use routinely). See here using Design -> Paragraph Spacing popup, notice how the initial state is not aligned exactly at the top of the cell, clicking on the track below the thumb to page down, then above the thumb to page up, we arrive at the same exact position:



diff 1 and 3:

-------------
PR Comment: https://git.openjdk.org/jfx/pull/1326#issuecomment-2096570758
More information about the openjfx-dev
mailing list