changeset 9593:d0713da6d812 jdk-9+108

8090258: TabPane cannot shrink
author jgiles
date Mon, 29 Feb 2016 11:02:12 +1300
parents 7ff12c713064
children 89c38425ecf3 edfa37792384
files modules/controls/src/main/java/javafx/scene/control/skin/TabPaneSkin.java
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/modules/controls/src/main/java/javafx/scene/control/skin/TabPaneSkin.java	Mon Feb 29 10:58:38 2016 +1300
+++ b/modules/controls/src/main/java/javafx/scene/control/skin/TabPaneSkin.java	Mon Feb 29 11:02:12 2016 +1300
@@ -147,8 +147,6 @@
     private Rectangle tabHeaderAreaClipRect;
     private Tab selectedTab;
     private boolean isSelectingTab;
-    private double maxw = 0.0d;
-    private double maxh = 0.0d;
 
     private final TabPaneBehavior behavior;
 
@@ -274,6 +272,7 @@
     /** {@inheritDoc} */
     @Override protected double computePrefWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset) {
         // The TabPane can only be as wide as it widest content width.
+        double maxw = 0.0;
         for (TabContentRegion contentRegion: tabContentRegions) {
             maxw = Math.max(maxw, snapSize(contentRegion.prefWidth(-1)));
         }
@@ -290,6 +289,7 @@
     /** {@inheritDoc} */
     @Override protected double computePrefHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset) {
         // The TabPane can only be as high as it highest content height.
+        double maxh = 0.0;
         for (TabContentRegion contentRegion: tabContentRegions) {
             maxh = Math.max(maxh, snapSize(contentRegion.prefHeight(-1)));
         }