On Thu, 16 Jan 2025 22:41:07 GMT, Marius Hanl <[email protected]> wrote:
>> Relying on two pulses may cause flicker (I had a similar issue with the
>> RichTextArea).
>>
>> The solution is to re-compute the layout in layoutChildren() when needed
>> (i.e. when scroll bar status changes).
>
> Good to know, we should document your solution in more detail (and with the
> concrete fix -> code snippet from the RTA) together with the HSB bug as a new
> ticket probably? Then we may already have a potential solution with code, and
> of course a ticket that tracks the bug, if we do not have already (I think I
> saw a similar bug already, but not 100% sure).
VFlow LL1529-1555
// scroll bars
boolean vsbVisible = useContentHeight ?
false :
(topCellIndex() > 0) ?
true :
(arrangementHeight + contentPaddingTop + contentPaddingBottom)
> viewPortHeight;
if (vsbVisible != vscroll.isVisible()) {
vscroll.setVisible(vsbVisible);
// do another layout pass with the scrollbar updated
layoutCells();
return;
}
if (vsbVisible) {
width -= vsbWidth;
}
boolean hsbVisible = (wrap || useContentWidth) ?
false :
(unwrappedWidth + contentPaddingLeft + contentPaddingRight) >
viewPortWidth;
if (hscroll.isVisible() != hsbVisible) {
hscroll.setVisible(hsbVisible);
// do another layout pass with the scrollbar updated
layoutCells();
return;
}
https://github.com/andy-goryachev-oracle/jfx/blob/d07d408fa79e25a02b0d5e2f9aeb3990a7136077/modules/jfx.incubator.richtext/src/main/java/com/sun/jfx/incubator/scene/control/richtext/VFlow.java#L1529
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/1644#discussion_r1919336541