changeset 5036:3911a222bf96

RT-32731: Incorrect ellipsis on different options of max and pref size
author leifs
date Mon, 16 Sep 2013 20:11:55 -0700
parents e346d89c380b
children d71966968a9a 50a4af3f8b03
files modules/controls/src/main/java/com/sun/javafx/scene/control/skin/CheckBoxSkin.java modules/controls/src/main/java/com/sun/javafx/scene/control/skin/RadioButtonSkin.java
diffstat 2 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/CheckBoxSkin.java	Tue Sep 17 10:25:21 2013 +1200
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/CheckBoxSkin.java	Mon Sep 16 20:11:55 2013 -0700
@@ -80,7 +80,7 @@
         final CheckBox checkBox = getSkinnable(); 
         final double boxWidth = snapSize(box.prefWidth(-1));
         final double boxHeight = snapSize(box.prefHeight(-1));
-        final double computeWidth = Math.min(checkBox.prefWidth(-1),checkBox.minWidth(-1));
+        final double computeWidth = Math.max(checkBox.prefWidth(-1), checkBox.minWidth(-1));
         final double labelWidth = Math.min( computeWidth - boxWidth, w - snapSize(boxWidth));
         final double labelHeight = Math.min(checkBox.prefHeight(labelWidth), h);
         final double maxHeight = Math.max(boxHeight, labelHeight);
@@ -91,4 +91,4 @@
         box.resize(boxWidth, boxHeight);
         positionInArea(box, xOffset, yOffset, boxWidth, maxHeight, 0, checkBox.getAlignment().getHpos(), checkBox.getAlignment().getVpos());
     }
-}    
\ No newline at end of file
+}    
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/RadioButtonSkin.java	Tue Sep 17 10:25:21 2013 +1200
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/RadioButtonSkin.java	Mon Sep 16 20:11:55 2013 -0700
@@ -97,7 +97,7 @@
         final RadioButton radioButton = getSkinnable();
         final double radioWidth = radio.prefWidth(-1);
         final double radioHeight = radio.prefHeight(-1);
-        final double computeWidth = Math.min(radioButton.prefWidth(-1),radioButton.minWidth(-1));
+        final double computeWidth = Math.max(radioButton.prefWidth(-1),radioButton.minWidth(-1));
         final double labelWidth = Math.min(computeWidth - radioWidth, w - snapSize(radioWidth));
         final double labelHeight = Math.min(radioButton.prefHeight(labelWidth), h);
         final double maxHeight = Math.max(radioHeight, labelHeight);