You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Following the Intellij principles for colors, there are sometimes situations for some themes where the rendering of an icon selection (JToggleButton) is not good (very low contrast).
In the example below with Monokai Pro (Material), we see the rendering of the selection of the Draw action:
To try to improve this, I use the method setSelectedIcon() and FlatSVGIcon.setColorFilter() to make the gray of the icons darker. However the setColorFilter() method applies to an icon but I haven't found a way to derive an existing FlatSVGIcon (like for getDisabledIcon() or scale) without having to completely reload the icon. Is this the right way to do it or am I missing something obvious?
The text was updated successfully, but these errors were encountered:
There is no method to clone a FlatSVGIcon. Maybe should add one...
Anyway FlatSVGIcon has a cache that avoids loading SVG file if already loaded.
So creating two FlatSVGIcon with same name/URL loads the SVG file only once.
BTW the constructor of FlatSVGIcon is very lightweight because it does not load anything.
The SVG file is only loaded when needed (when invoking getIconWidth(), getIconHeight() or paintIcon()).
In fact when icons are created in actions or others, it is difficult when retrieving icons of type FlatSVGIcon to be able to create on the fly a derived icon (for selection or rollover) because there is no method to get the URI.
Having a method FlatSVGIcon.derive(ColorFilter colorFilter ) would allow to benefit easily from all the possibilities related to the filters.
Following the Intellij principles for colors, there are sometimes situations for some themes where the rendering of an icon selection (JToggleButton) is not good (very low contrast).
In the example below with Monokai Pro (Material), we see the rendering of the selection of the Draw action:
To try to improve this, I use the method setSelectedIcon() and FlatSVGIcon.setColorFilter() to make the gray of the icons darker. However the setColorFilter() method applies to an icon but I haven't found a way to derive an existing FlatSVGIcon (like for getDisabledIcon() or scale) without having to completely reload the icon. Is this the right way to do it or am I missing something obvious?
The text was updated successfully, but these errors were encountered: