-
-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Specifying icon size in "em" is not working #150
Comments
If you want to try it yourself simply clone my "GemsFX" project and run TagFieldApp after changing this rule: .tags-field .graphic-wrapper .ikonli-font-icon {
-fx-icon-size: 1.0em;
-fx-icon-color: -fx-text-background-color;
} |
ikonli/core/ikonli-javafx/src/main/java/org/kordamp/ikonli/javafx/FontIcon.java Lines 130 to 136 in f73e0aa
|
I think it's a bug and the problem is here: FontIcon.this.setFont(Font.font(font.getFamily(), n.doubleValue()));
FontIcon.this.setStyle(normalizeStyle(getStyle(), "-fx-font-size", n.intValue() + "px")); It's sets the font size twice and the second line forces size listener to call itself recursively. Just removing it is enough to fix the issue, because To workaround this simply extend |
The only "em" size that works is "1em". If I specify a number smaller than 1 then the icon does not show up at all. If I specify a number larger than 1 then I can see the icon quickly grow bigger and bigger until it disappears. The attached screenshot shows an intermediate step of this growth process.
The text was updated successfully, but these errors were encountered: