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

Add support for vertical alignment of text on buttons

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Withdrawn
    • Icon: P4 P4
    • 8
    • None
    • javafx

      If I add a stylesheet containing

      .button {
      -fx-font: 42px "Myriad Pro Bold";
      -fx-alignment: center;
      vertical-align: middle;
      }

      The text on my button is not centered vertically. According to the CSS reference guide there is no fx specific property for this.

      My present workaround is to add a padding of
      -fx-padding: 12 12 0 12;

            kwwong Kinsley Wong (Inactive)
            risaksen Randahl Isaksen
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: