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

Support width and height styling of ImageView

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 8u60
    • javafx
    • None

      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.

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

              Created:
              Updated: