[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-openjfx-dev
Subject:    Re: RFR: 8277785: ListView scrollTo jumps to wrong location when CellHeight is changed [v6]
From:       Johan Vos <jvos () openjdk ! java ! net>
Date:       2022-05-23 20:44:47
Message-ID: ZnSD2_LMJSc0df4_xcaRrJNLBXSVSSjSlpyGDpzAP5o=.785e2db3-da0f-4f43-a685-6df65f5973d1 () github ! com
[Download RAW message or body]

> 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
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic