-
Enhancement
-
Resolution: Fixed
-
P3
-
fx2.1
-
javafx-sdk2.1.0-fcs-b21
JavaFX should support setting control min/pref/max sizes via css. This is necessary because there are many cases when size depends on other properties set via css. For example, when you use sliced border image you need to specify minimum size for the control to look correctly with this image. On the other hand size of the element is as important part of UI as the image or color so it is really missing from list of properties you can specify via CSS.
I propose the following properties:
-fx-min-width: <length>
-fx-min-height: <length>
-fx-pref-width: <length>
-fx-pref-height: <length>
-fx-max-width: <length>
-fx-max-height: <length>
<size> is defined in http://docs.oracle.com/javafx/2/api/javafx/scene/doc-files/cssref.html#typelength
Percentage values are not allowed since the actual value would be computed from the width and/or height of the Node's parent before the parent is laid out.
I propose the following properties:
-fx-min-width: <length>
-fx-min-height: <length>
-fx-pref-width: <length>
-fx-pref-height: <length>
-fx-max-width: <length>
-fx-max-height: <length>
<size> is defined in http://docs.oracle.com/javafx/2/api/javafx/scene/doc-files/cssref.html#typelength
Percentage values are not allowed since the actual value would be computed from the width and/or height of the Node's parent before the parent is laid out.