Browse Source

REPORT-20318 sonar问题修复

research/11.0
zack 5 years ago
parent
commit
6db2cdea8f
  1. 7
      designer-base/src/main/java/com/fr/design/gui/iscrollbar/UISBChooser.java

7
designer-base/src/main/java/com/fr/design/gui/iscrollbar/UISBChooser.java

@ -199,6 +199,7 @@ public class UISBChooser extends JDialog {
twoColorField.setUpperColor(outColor);
}
@SuppressWarnings("squid:S2164")
public static Color getAdjustedColor(Color inColor, int sat, int bri) {
Color briColor = inColor;
@ -220,9 +221,9 @@ public class UISBChooser extends JDialog {
int dg = briColor.getGreen() - satColor.getGreen();
int db = briColor.getBlue() - satColor.getBlue();
r = briColor.getRed() - (int) Math.round(dr * sat / VALUE * 1.0);
g = briColor.getGreen() - (int) Math.round(dg * sat / VALUE * 1.0);
b = briColor.getBlue() - (int) Math.round(db * sat / VALUE * 1.0);
r = briColor.getRed() - (int) Math.round(dr * sat / (VALUE * 1.0));
g = briColor.getGreen() - (int) Math.round(dg * sat / (VALUE * 1.0));
b = briColor.getBlue() - (int) Math.round(db * sat / (VALUE * 1.0));
} else {
float d = ColorRoutines.getGreyValue(briColor);
float dr = briColor.getRed() - d;

Loading…
Cancel
Save