Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8102492

Support setting min/pref/max sizes via css

    Details

      Description

      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.

        Attachments

          Activity

            People

            • Assignee:
              dgrieve David Grieve (Inactive)
              Reporter:
              mrkam Alexander Kuznetcov (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Due:
                Created:
                Updated:
                Resolved:
                Imported: