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

ImageView.fitWidth has no effect (Button graphic)

XMLWordPrintable

      I have an image which is 300x300. I set the ImageView fitWidth and fitHeight to 150x150, and by setting cache and smooth to true I get a perfectly smoothly scaled image. Now, if I place the image in a pane it shows up measuring 150x150 as expected, but if I place it on a button using setGraphic(Node) it shows up measuring 300x300. I think this is counter intuitive.

      While it is possible to scale down the ImageView using setScaleX, Y, Z, that does not create a perfectly smoothly scaled image, so - at least in my use case - that is not a viable alternative.

            miflemi Mick Fleming
            risaksen Randahl Isaksen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: