Browse Source

Merge pull request #1193 in DESIGN/design from ~ZACK/design:feature/10.0 to feature/10.0

* commit '6db2cdea8f72331a30f81b0384dc4f82ac2d0229':
  REPORT-20318 sonar问题修复
research/11.0
zack 5 years ago
parent
commit
fdd853cde4
  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); twoColorField.setUpperColor(outColor);
} }
@SuppressWarnings("squid:S2164")
public static Color getAdjustedColor(Color inColor, int sat, int bri) { public static Color getAdjustedColor(Color inColor, int sat, int bri) {
Color briColor = inColor; Color briColor = inColor;
@ -220,9 +221,9 @@ public class UISBChooser extends JDialog {
int dg = briColor.getGreen() - satColor.getGreen(); int dg = briColor.getGreen() - satColor.getGreen();
int db = briColor.getBlue() - satColor.getBlue(); int db = briColor.getBlue() - satColor.getBlue();
r = briColor.getRed() - (int) Math.round(dr * 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); g = briColor.getGreen() - (int) Math.round(dg * sat / (VALUE * 1.0));
b = briColor.getBlue() - (int) Math.round(db * sat / VALUE * 1.0); b = briColor.getBlue() - (int) Math.round(db * sat / (VALUE * 1.0));
} else { } else {
float d = ColorRoutines.getGreyValue(briColor); float d = ColorRoutines.getGreyValue(briColor);
float dr = briColor.getRed() - d; float dr = briColor.getRed() - d;

Loading…
Cancel
Save