ScrollPane: incorrect preferred size with ScrollBarPolicy.NEVER

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: P4
    • tbd
    • Affects Version/s: jfx20
    • Component/s: javafx
    • None

      When ScrollBar has ScrollBarPolicy.NEVER set on one side, and ScrollBarPolicy.AS_NEEDED on the other, it is expected that its preferred size would account for appearing/disappearing scroll bar when the available space changes.

      To reproduce, run the attached code and manually reduce the window height.

      Notice that the left edge of the label with the red border does not shift when the vertical scroll bar appears, and also how the vertical scroll bar overlaps the label and its right border.

        1. Screenshot 2023-08-30 at 16.09.10.png
          316 kB
          Andy Goryachev
        2. Screenshot 2023-08-30 at 16.09.18.png
          258 kB
          Andy Goryachev
        3. ScrollPane_Pref.java
          2 kB
          Andy Goryachev

            Assignee:
            Unassigned
            Reporter:
            Andy Goryachev
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: