Skip to content

如何设置ikon图标 #132

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

Open
iyutong opened this issue Apr 16, 2025 · 2 comments
Open

如何设置ikon图标 #132

iyutong opened this issue Apr 16, 2025 · 2 comments

Comments

@iyutong
Copy link

iyutong commented Apr 16, 2025

看其他问题,我知道了这个主题禁止了ikon原本的图标设置,所以如何设置图标大小?

@xzel23
Copy link

xzel23 commented Apr 17, 2025

Disclaimer: I am not a maintainer of this project.

I am sure you use some browser plugin that translates GitHub for you. It works because the whole site is in English. But for us others, your text is unreadable and shows up as Chinese, which most of us cannot read.

I think you will get better feedback if you translate your texts to English before posting.

@xiongchun
Copy link

xiongchun commented May 17, 2025

have a try as follows:

public static FontIcon fontIcon(@NonNull Ikon iconCode, int fontSize) {
        var icon = new FontIcon(iconCode);
        icon.setStyle(icon.getStyle() + StrUtil.format("-fx-icon-size: {}px;", fontSize));
        return icon;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants