RFR: 8277785: ListView scrollTo jumps to wrong location when CellHeight is changed [v2]
Johan Vos
jvos at openjdk.java.net
Thu Mar 24 10:06:35 UTC 2022
On Tue, 22 Mar 2022 08:47:42 GMT, Johan Vos <jvos at openjdk.org> wrote:
>> When the size of a ListCell is changed and a scrollTo method is invoked without having a layout calculation in between, the old (wrong) size is used to calculcate the total estimate. This happens e.g. when the size is changed in the `updateItem` method.
>> This PR will immediately resize the cell and sets the new value in the cache containing the cellsizes.
>
> Johan Vos has updated the pull request incrementally with one additional commit since the last revision:
>
> Add the option to shift all cells down in case the current calculations would lead to empty cells at the end of the view,
> while there are available cells before the beginning of the view.
There was a problem in ListView, in which cells are shifted down in case there are empty cells being rendered while there are leading cells available.
I also added a testcase for this that fails before and succeeds after.
-------------
PR: https://git.openjdk.java.net/jfx/pull/712
More information about the openjfx-dev
mailing list