Great Info, anyone figured out how to get Material Icons to display correctly, currently I get a Square displayed. I am using the MI on buttons in a B4J UI app. This is obviously in relation to Metro Dark/Light themes.
Regards
John.
It appears to be the way CSS actually works.
From what I understand the metro CSS is conflicting with the style set by the designer, and the metro is winning either because:
1. It has a higher specificity
2. It is loaded after the style set in the designer
I have removed the following entries from the base.css which means that the size, colour and font are now handled by the Designer
-fx-font-family: "Segoe UI";
-fx-font-size: <font-size>
-fx-text-fill: text_color;
If you wish to keep the Segoe font but also use Material Icons you could try creating a Material CSS file and load it to the items that require it after loading metro?
Not tested, but seems like it could be a solution.
as
@tchart said previously 'com.sun.jfxtras' needs changing to 'jfxtras'
impl.jfxtras.styles will be solved by using the following:
Download jmetro-11.6.11.jar
https://github.com/JFXtras/jfxtras-styles/releases
Add it to your additional libraries folder and add to your project:
B4X:
#AdditionalJar: jmetro-11.6.11
This
'works', however my TextFields are now running away so your mileage may vary.
? EDIT: seems to cause more than that. Think i'll stay with the standard skin