tabler-icons | 4200 free MIT-licensed high | Icon library
kandi X-RAY | tabler-icons Summary
kandi X-RAY | tabler-icons Summary
A set of over 1450 free MIT-licensed high-quality SVG icons for you to use in your web projects. Each icon is designed on a 24x24 grid and a 2px stroke.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Create a compiled template .
- Icon indentation .
- icon - border
- creates a css left corner
- icons layout - align
- returns icon list
- creates a cross - browser
- Icon table .
- Generates an icon for a badge .
- Draws the icon .
tabler-icons Key Features
tabler-icons Examples and Code Snippets
Community Discussions
Trending Discussions on tabler-icons
QUESTION
I am designing a GUI with Java Swing and AWT (Java 8) and am struggling with the icons I use.
I load a large PNG image and scale it to 18x18px and then use it in a button or label. It works well in all resolutions when the operating system does not zoom in.
However, with the advent of large screen resolutions (hidpi), it is common practice to use operating system settings to zoom in on user interface controls, including buttons and such things in Java applications. For example, on Windows I use a 150% or 200% scaling of user elements with my 4K resolution to ensure the user interface is still usable. I imagine many users will do so as well.
When that is the case, however, the icons are merely increased in size after already scaling them down to 18x18px. That is, I first scale them down and then the operating system tries to scale them up again with the little information that is still left in the image.
Is there any way to design image icons in Java that are based on a higher resolution when the zooming/scaling capabilities of the operating system are used in order to avoid them appearing blurred?
Here is a working example:
...ANSWER
Answered 2022-Feb-15 at 21:36Java 8 does not support High DPI, the UI gets scaled up by Windows. You should use Java 11 or a later version which support per-monitor High DPI settings.
If your goal is to make the icons look crisp, prepare a set of icons for different resolutions using BaseMultiResolutionImage
(the basic implementation of MultiResolutionImage
) to provide higher resolution alternatives. (These are not available in Java 8.)
You say that you scaled down the original image (240×240) to 18×18px. If the UI needs a higher resolution according to the system setting, all it has now is your small icon (18×18) which will be scaled up, which results in poor quality. You should use a MultiResolutionImage
or paint the original image into the required size, letting Graphics
to scale it down for you.
This is the simplest way I came up with to make the icon 18×18 without downscaling the original image:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install tabler-icons
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page