mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2025-12-07 06:20:53 +03:00
FlatSVGIcon: if icon has color filter and did change the color, then do not apply global color filter
This commit is contained in:
@@ -702,10 +702,14 @@ public class FlatSVGIcon
|
||||
}
|
||||
|
||||
private Color filterColor( Color color ) {
|
||||
if( colorFilter != null )
|
||||
color = colorFilter.filter( color );
|
||||
if( globalColorFilter != null )
|
||||
if( colorFilter != null ) {
|
||||
Color newColor = colorFilter.filter( color );
|
||||
color = (newColor != color)
|
||||
? newColor
|
||||
: globalColorFilter.filter( color );
|
||||
} else
|
||||
color = globalColorFilter.filter( color );
|
||||
|
||||
if( grayFilter != null ) {
|
||||
int oldRGB = color.getRGB();
|
||||
int newRGB = grayFilter.filterRGB( 0, 0, oldRGB );
|
||||
|
||||
Reference in New Issue
Block a user