From ee19b29f7834dde2d047bfec5ea63fec5bab4794 Mon Sep 17 00:00:00 2001 From: "alex.sung" Date: Wed, 11 Sep 2019 09:16:41 +0800 Subject: [PATCH] =?UTF-8?q?sonar=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/design/gui/frpane/CommitTabbedPane.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/gui/frpane/CommitTabbedPane.java b/designer-base/src/main/java/com/fr/design/gui/frpane/CommitTabbedPane.java index 85dbdbe5c..afbf43c30 100644 --- a/designer-base/src/main/java/com/fr/design/gui/frpane/CommitTabbedPane.java +++ b/designer-base/src/main/java/com/fr/design/gui/frpane/CommitTabbedPane.java @@ -296,7 +296,7 @@ public class CommitTabbedPane extends JComponent implements MouseListener, Mous double[] x = {startX, startX, startX + tabWidth, startX + tabWidth, startX}; double[] y = {-1, getHeight(), getHeight(), -1, -1}; RoundRectangle2D.Double rect1 = new RoundRectangle2D.Double(startX, 1, this.getWidth(), this.getHeight(), 7, 7); - g2d.setPaint(new GradientPaint(1, 1, new Color(255, 255, 255), 1, getHeight() - 1, UIConstants.NORMAL_BACKGROUND)); + g2d.setPaint(new GradientPaint(1, 1, new Color(255, 255, 255), 1, getHeight() - 1f, UIConstants.NORMAL_BACKGROUND)); GeneralPath generalPath = new GeneralPath(Path2D.WIND_EVEN_ODD, x.length); generalPath.moveTo((float) x[0] + CORNOR_RADIUS, (float) y[0]); @@ -345,9 +345,9 @@ public class CommitTabbedPane extends JComponent implements MouseListener, Mous double[] x = {startX, startX, startX + tabWidth, startX + tabWidth, startX}; double[] y = {-1, getHeight() - 1, getHeight() - 1, -1, -1}; if (selfIndex == mouseOveredIndex) { - g2d.setPaint(new GradientPaint(1, 1, new Color(255, 255, 255), 1, getHeight() - 1, UIConstants.NORMAL_BACKGROUND)); + g2d.setPaint(new GradientPaint(1, 1, new Color(255, 255, 255), 1, getHeight() - 1f, UIConstants.NORMAL_BACKGROUND)); } else { - g2d.setPaint(new GradientPaint(1, 1, UIConstants.NORMAL_BACKGROUND, 1, getHeight() - 1, UIConstants.NORMAL_BACKGROUND)); + g2d.setPaint(new GradientPaint(1, 1, UIConstants.NORMAL_BACKGROUND, 1, getHeight() - 1f, UIConstants.NORMAL_BACKGROUND)); }