atlantafx
atlantafx copied to clipboard
Resize ikons with font
In the Sampler app resizing the fonts works beautifully when zooming in/out. However ikons don't. Found the corresponding code but it doesn't work.
Ikonli doesn't support em
. I see you're already found the issue. There's not much I can do. I will add icon scaling and size support when/if it's fixed.
Actually I was able to scale icons with your solution from the Sampler:
String cssString = String.format(".ikonli-font-icon {-fx-icon-size: %d;}", size.intValue() + 3);
scene.getRoot().getStylesheets().removeIf(uri -> uri.startsWith("data:text/css"));
scene.getRoot().getStylesheets().add(
"data:text/css;base64," + Base64.getEncoder().encodeToString(cssString.toString().getBytes(UTF_8))
);
But em
sizing would be nice indeed!