FlatSVGIcon: if icon has color filter and did change the color, then do not apply global color filter

This commit is contained in:
Karl Tauber
2021-04-16 23:25:22 +02:00
parent 34861166e8
commit ec2fccbb0e

View File

@@ -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 );