--- old/modules/javafx.controls/src/main/java/javafx/scene/control/skin/TitledPaneSkin.java 2016-09-27 21:00:28.000000000 -0700 +++ new/modules/javafx.controls/src/main/java/javafx/scene/control/skin/TitledPaneSkin.java 2016-09-27 21:00:28.000000000 -0700 @@ -232,7 +232,7 @@ final double w, final double h) { // header - double headerHeight = snapSize(titleRegion.prefHeight(-1)); + double headerHeight = snapSizeY(titleRegion.prefHeight(-1)); titleRegion.resize(w, headerHeight); positionInArea(titleRegion, x, y, @@ -246,9 +246,11 @@ contentHeight = (prefHeightFromAccordion - headerHeight) * getTransition(); } } - contentHeight = snapSize(contentHeight); + contentHeight = snapSizeY(contentHeight); - y += snapSize(headerHeight); + // Header height was already snapped above. Is this just in case + // mods are made to the intervening code? Or is it just redundant? + y += snapSizeY(headerHeight); contentContainer.resize(w, contentHeight); clipRect.setHeight(contentHeight); positionInArea(contentContainer, x, y, @@ -257,30 +259,30 @@ /** {@inheritDoc} */ @Override protected double computeMinWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset) { - double titleWidth = snapSize(titleRegion.prefWidth(height)); - double contentWidth = snapSize(contentContainer.minWidth(height)); + double titleWidth = snapSizeX(titleRegion.prefWidth(height)); + double contentWidth = snapSizeX(contentContainer.minWidth(height)); return Math.max(titleWidth, contentWidth) + leftInset + rightInset; } /** {@inheritDoc} */ @Override protected double computeMinHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset) { - double headerHeight = snapSize(titleRegion.prefHeight(width)); + double headerHeight = snapSizeY(titleRegion.prefHeight(width)); double contentHeight = contentContainer.minHeight(width) * getTransition(); - return headerHeight + snapSize(contentHeight) + topInset + bottomInset; + return headerHeight + snapSizeY(contentHeight) + topInset + bottomInset; } /** {@inheritDoc} */ @Override protected double computePrefWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset) { - double titleWidth = snapSize(titleRegion.prefWidth(height)); - double contentWidth = snapSize(contentContainer.prefWidth(height)); + double titleWidth = snapSizeX(titleRegion.prefWidth(height)); + double contentWidth = snapSizeX(contentContainer.prefWidth(height)); return Math.max(titleWidth, contentWidth) + leftInset + rightInset; } /** {@inheritDoc} */ @Override protected double computePrefHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset) { - double headerHeight = snapSize(titleRegion.prefHeight(width)); + double headerHeight = snapSizeY(titleRegion.prefHeight(width)); double contentHeight = contentContainer.prefHeight(width) * getTransition(); - return headerHeight + snapSize(contentHeight) + topInset + bottomInset; + return headerHeight + snapSizeY(contentHeight) + topInset + bottomInset; } /** {@inheritDoc} */ @@ -329,7 +331,7 @@ } double getTitleRegionSize(double width) { - return snapSize(titleRegion.prefHeight(width)) + snappedTopInset() + snappedBottomInset(); + return snapSizeY(titleRegion.prefHeight(width)) + snappedTopInset() + snappedBottomInset(); } private double prefHeightFromAccordion = 0; @@ -338,9 +340,9 @@ } double getTitledPaneHeightForAccordion() { - double headerHeight = snapSize(titleRegion.prefHeight(-1)); + double headerHeight = snapSizeY(titleRegion.prefHeight(-1)); double contentHeight = (prefHeightFromAccordion - headerHeight) * getTransition(); - return headerHeight + snapSize(contentHeight) + snappedTopInset() + snappedBottomInset(); + return headerHeight + snapSizeY(contentHeight) + snappedTopInset() + snappedBottomInset(); } private void doAnimationTransition() {