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

Support width and height styling of ImageView

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: 8u60
    • Fix Version/s: tbd
    • Component/s: javafx
    • Labels:
      None

      Description

      When showing an image on, say, a button, it is not yet possible to style the size of the image.

      Images on buttons are shown by using an ImageView as the graphic of a button as in

      button.setGraphic(new ImageView(aPictureOfKevinReadingThisJiraIssue);

      However, if you look at the docs found here

      https://docs.oracle.com/javase/8/javafx/api/javafx/scene/doc-files/cssref.html#pane

      ImageView does not support sizing properties such as -fx-pref-width, -fx-min-width, -fx-max-width.

      I believe this feature is important because the size of an image shown might very well depend on the style sheet used. I would like to let my users pick between several style sheets, so people with reading disabilities can choose a style sheet with larger fonts and images. That will require me to style the images larger in my readability.css file.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              risaksen Randahl Isaksen
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated: