On Tue, 20 May 2025 09:35:45 GMT, Ambarish Rapte <[email protected]> wrote:
>>> Would it be possible to avoid re-layout of the cells that are after the
>>> Cell with a disclosureNode ?
>>
>> This is actually what is happening, when we scroll down and find a TreeCell
>> that has a disclosure node this is when the condition `disclosureWidth >
>> defaultDisclosureWidth` is true and we do a re-layout of the visible
>> previous cells before the disclosure node and the new value is saved in the
>> `maxDisclosureWidthMap` so the cells that are layouted after the disclosure
>> node when scrolling are using the new value of `defaultDisclosureWidth`.
>
> Yes, the cells after disclosure node use the new `defaultDisclosureWidth`.
> But their layout happens twice using the new `defaultDisclosureWidth`.
>
> **First time**: The loop `for (IndexedCell cell : flow.cells) {` initiates
> the layout of all the cells, including the cells that are after the
> disclosure node.
>
> **Second time**: and layout of those after cells happens again as part of
> ongoing layout of `TreeView` from this method `Parent.layout()`
as long as both layouts happens within the same pulse, we should be ok.
I did not see any flicker with the last change.
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/1715#discussion_r2098561451