RFR: 8277785: ListView scrollTo jumps to wrong location when CellHeight is changed [v6]
Johan Vos
jvos at openjdk.java.net
Mon May 23 20:44:47 UTC 2022
> 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:
Try to keep visible cells at their original position when improving the estimate.
This reduces annoying effects when re-layouting cells without relevant changes.
This should not be done when we don't have a valid estimate yet/anymore,
or when the absoluteOffset is set to infinity (which may happen if the
position is set to infinity, which is the case in some calls in Skin classes).
-------------
Changes:
- all: https://git.openjdk.java.net/jfx/pull/712/files
- new: https://git.openjdk.java.net/jfx/pull/712/files/aa08ba26..c7d722d3
Webrevs:
- full: https://webrevs.openjdk.java.net/?repo=jfx&pr=712&range=05
- incr: https://webrevs.openjdk.java.net/?repo=jfx&pr=712&range=04-05
Stats: 121 lines in 2 files changed: 75 ins; 29 del; 17 mod
Patch: https://git.openjdk.java.net/jfx/pull/712.diff
Fetch: git fetch https://git.openjdk.java.net/jfx pull/712/head:pull/712
PR: https://git.openjdk.java.net/jfx/pull/712
More information about the openjfx-dev
mailing list