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

Add support for vertical alignment of text on buttons

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Closed
    • Priority: P4
    • Resolution: Withdrawn
    • Affects Version/s: None
    • Fix Version/s: 8
    • Component/s: javafx
    • Labels:

      Description

      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;

        Attachments

          Activity

            People

            Assignee:
            kwwong Kinsley Wong
            Reporter:
            risaksen Randahl Isaksen
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported: