Skip to content
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

Flat L&F and disabled Icons #86

Closed
thammoud opened this issue Sep 9, 2020 · 0 comments
Closed

Flat L&F and disabled Icons #86

thammoud opened this issue Sep 9, 2020 · 0 comments
Assignees
Milestone

Comments

@thammoud
Copy link

thammoud commented Sep 9, 2020

Hi,

It seems that the Flat Look and Feel has a ImageIcon hard code when generating a disabled Icon for buttons. Using Ikonli with FlatLAF does not really disable the icons.

I had to add the following code to convert to ImageIcon. It will be nice to add to FontIcon itself.

private ImageIcon toImageIcon(Icon icon) {
        BufferedImage image = new BufferedImage(icon.getIconWidth(), icon.getIconHeight(), BufferedImage.TYPE_INT_ARGB);
        icon.paintIcon(null, image.getGraphics(), 0, 0);
        ImageIcon ii = new ImageIcon(image);
        return ii;
  }

@aalmiray aalmiray self-assigned this Sep 9, 2020
@aalmiray aalmiray added this to the 11.6.0 milestone Sep 9, 2020
@aalmiray aalmiray modified the milestones: 11.6.0, 12.0.0 Nov 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants