Rectangles showed up when using FXML

Issue #21 resolved
timo reichen created an issue

<Button fx:id="iconWeb" style="-fx-font-size: 16.0;" onAction="#load" > <graphic> <FontAwesomeIconView glyphName="CLOUD"/> </graphic> </Button>

Using FXML will show up Rectangles. Declared as Code, all is fine. Means this:

GlyphsDude.setIcon(btnNewMail, FontAwesomeIcon.PAPER_PLANE_ALT, "14", ContentDisplay.LEFT);

produces correctly looking icons on the gui.

I have used FXML in Version 8.10.7 which was working fine. Then i have updated to 8.7. Since then i am struggeling. I then tried out back till Version 8.1. With none version it was working anymore.. Idea?

Jdk 1.8.0_66 on Mac OSX 10.10.5

Comments (9)

  1. timo reichen reporter

    Ok, found the cause of it: specifying -fx-font-family: 'Arial'; in the css .root. So commenting it out all is working. But of coursce its not possible to declare a font-family.

  2. Arpan Darivemula

    I had the same issue of rectangles showing up. Looks like it happens when you have any font class css like family or size. As long as I swap the font-size for scale and remove the family it works.

    -fx-translate-x: 2px;
    -fx-scale-x: 1.7;
    -fx-scale-y: 1.7;
    
  3. Log in to comment