Button with Text and Graphic has incorrect alignment of Graphic

XMLWordPrintable

    • Type: Bug
    • Resolution: Cannot Reproduce
    • Priority: P4
    • 8
    • Affects Version/s: 8
    • Component/s: javafx
    • Environment:

      Windows 7 64-bit
      Java Version: 1.8.0-ea-b108
      JavaFX Version: 8.0.0-ea-b108

      In b108 graphics in buttons are not aligned correctly.

      ToggleButton button = new ToggleButton();
      button.textProperty().bind(someTextProperty);
      button.setGraphic(myImage);
      button.setAlignment(Pos.TOP_CENTER);
      button.setContentDisplay(ContentDisplay.BOTTOM);
      button.setTextAlignment(TextAlignment.CENTER);
      button.setTextOverrun(OverrunStyle.ELLIPSIS);

      With Java 8 b108, the left edge of the graphic is in the center of the button.
      With Java 8 b106, the center of the graphic is in the center of the button.
      The text is correctly centered in the button above the graphic in both cases.

            Assignee:
            Leif Samuelsson (Inactive)
            Reporter:
            Scott Palmer
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: