Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8128186

Scrollbar : padding isn't taken into account when calculating if ScrollBar thumb will fit.

    Details

      Description


      Since RT-14419 ScrollBars have attempted to cope with certain situations where they don't
      properly fit in the available space.
      This fix doesn't take account of insets when calculating whether the thumb will fit.

      This change will fix it :


      diff -r 6996b51297c5 javafx-ui-controls/src/com/sun/javafx/scene/control/skin/ScrollBarSkin.java
      --- a/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/ScrollBarSkin.java Sat Aug 20 16:58:50 2011 -0700
      +++ b/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/ScrollBarSkin.java Mon Aug 22 12:08:05 2011 +0100
      @@ -352,8 +352,8 @@ public class ScrollBarSkin extends SkinB
               }
       
               // things should be invisible only when well below minimum length
      - if (getSkinnable().getOrientation() == Orientation.VERTICAL && h >= computeMinHeight(-1) ||
      - getSkinnable().getOrientation() == Orientation.HORIZONTAL && w >= computeMinWidth(-1)) {
      + if (getSkinnable().getOrientation() == Orientation.VERTICAL && h >= (computeMinHeight(-1) - (getInsets().getTop()+getInsets().getBottom())) ||
      + getSkinnable().getOrientation() == Orientation.HORIZONTAL && w >= (computeMinWidth(-1) - (getInsets().getLeft()+getInsets().getRight()))) {
                   track.setVisible(true);
                   thumb.setVisible(true);
                   incButton.setVisible(true);

        Attachments

          Activity

            People

            • Assignee:
              miflemi Mick Fleming (Inactive)
              Reporter:
              miflemi Mick Fleming (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported: