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

ImageView.fitWidth has no effect (Button graphic)

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Cannot Reproduce
    • Affects Version/s: 7u6
    • Fix Version/s: 8u20
    • Component/s: javafx
    • Environment:

      Mac

      Description

      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.

        Attachments

          Activity

            People

            Assignee:
            miflemi Mick Fleming (Inactive)
            Reporter:
            risaksen Randahl Isaksen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported: