modules/controls/src/main/java/javafx/scene/control/skin/ScrollBarSkin.java

Print this page

        

@@ -658,14 +658,14 @@
         @Override protected void layoutChildren() {
             final double top = snappedTopInset();
             final double left = snappedLeftInset();
             final double bottom = snappedBottomInset();
             final double right = snappedRightInset();
-            final double aw = snapSize(arrow.prefWidth(-1));
-            final double ah = snapSize(arrow.prefHeight(-1));
-            final double yPos = snapPosition((getHeight() - (top + bottom + ah)) / 2.0);
-            final double xPos = snapPosition((getWidth() - (left + right + aw)) / 2.0);
+            final double aw = snapSizeX(arrow.prefWidth(-1));
+            final double ah = snapSizeY(arrow.prefHeight(-1));
+            final double yPos = snapPositionY((getHeight() - (top + bottom + ah)) / 2.0);
+            final double xPos = snapPositionX((getWidth() - (left + right + aw)) / 2.0);
             arrow.resizeRelocate(xPos + left, yPos + top, aw, ah);
         }
 
         @Override protected double computeMinHeight(double width) {
             return prefHeight(-1);

@@ -676,17 +676,17 @@
         }
 
         @Override protected double computePrefWidth(double height) {
             final double left = snappedLeftInset();
             final double right = snappedRightInset();
-            final double aw = snapSize(arrow.prefWidth(-1));
+            final double aw = snapSizeX(arrow.prefWidth(-1));
             return left + aw + right;
         }
 
         @Override protected double computePrefHeight(double width) {
             final double top = snappedTopInset();
             final double bottom = snappedBottomInset();
-            final double ah = snapSize(arrow.prefHeight(-1));
+            final double ah = snapSizeY(arrow.prefHeight(-1));
             return top + ah + bottom;
         }
     }
 }