From f5be3e61e9577acfbefce38d94fa9ed5e20f2e56 Mon Sep 17 00:00:00 2001 From: kerry Date: Wed, 29 Sep 2021 16:04:56 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-60266=20=E4=B8=BB=E9=A2=98=E9=85=8D?= =?UTF-8?q?=E8=89=B2=E7=BC=96=E8=BE=91=E6=A1=86=E6=A0=B7=E5=BC=8F=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../style/color/NewColorSelectPane.java | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/style/color/NewColorSelectPane.java b/designer-base/src/main/java/com/fr/design/style/color/NewColorSelectPane.java index f38e69a8b..180055b3e 100644 --- a/designer-base/src/main/java/com/fr/design/style/color/NewColorSelectPane.java +++ b/designer-base/src/main/java/com/fr/design/style/color/NewColorSelectPane.java @@ -39,8 +39,10 @@ import java.util.List; public class NewColorSelectPane extends BasicPane implements ColorSelectable { private static final long serialVersionUID = -8634152305687249392L; - private static final int WIDTH = 197; - private static final int HEIGHT = 250; + private static final int WIDTH = 216; + private static final int HEIGHT = 230; + + private static final int DEFAULT_COLOR_HOR_INTERVAL = 4; //颜色衍生的数量 private static final int DEFAULT_DERIVE_COUNT = 5; @@ -81,7 +83,7 @@ public class NewColorSelectPane extends BasicPane implements ColorSelectable { initSelectButton(isSupportTransparent); // center JPanel centerPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_S_Pane(); - centerPane.setBorder(BorderFactory.createEmptyBorder(10, 4, 0, 4)); + centerPane.setBorder(BorderFactory.createEmptyBorder(10, 6, 0, 6)); this.add(centerPane, BorderLayout.CENTER); menuColorPane = getMenuColorPane(); @@ -126,14 +128,14 @@ public class NewColorSelectPane extends BasicPane implements ColorSelectable { customButton.setCursor(new Cursor(Cursor.HAND_CURSOR)); JPanel centerPane1 = new JPanel(new BorderLayout(0, 0)); - centerPane1.setBorder(BorderFactory.createEmptyBorder(9, 0, 11, 0)); + centerPane1.setBorder(BorderFactory.createEmptyBorder(8, 0, 9, 0)); centerPane1.add(customButton, BorderLayout.CENTER); customButton.setPreferredSize(new Dimension(197, 20)); centerPane.add(centerPane1); } private JPanel createStandardColorPane() { - JPanel jPanel = new JPanel(new GridLayout(1, 10, 3, 0)); + JPanel jPanel = new JPanel(new GridLayout(1, 10, DEFAULT_COLOR_HOR_INTERVAL, 0)); Color[] colorArray = ColorFactory.STANDARD_COLORS; for (int i = 0; i < colorArray.length; i++) { jPanel.add(new ColorCell(colorArray[i], this)); @@ -150,8 +152,8 @@ public class NewColorSelectPane extends BasicPane implements ColorSelectable { themeColorPane.add(menuColorPane, BorderLayout.SOUTH); menuColorPane.setLayout(new BorderLayout(0, 10)); - JPanel northPane = new JPanel(new GridLayout(1, 8, 3, 0)); - JPanel centerPane = new JPanel(new GridLayout(1, 8, 3, 0)); + JPanel northPane = new JPanel(new GridLayout(1, 8, DEFAULT_COLOR_HOR_INTERVAL, 0)); + JPanel centerPane = new JPanel(new GridLayout(1, 8, DEFAULT_COLOR_HOR_INTERVAL, 0)); menuColorPane.add(northPane, BorderLayout.NORTH); menuColorPane.add(centerPane, BorderLayout.CENTER); @@ -189,7 +191,7 @@ public class NewColorSelectPane extends BasicPane implements ColorSelectable { northPane.add(themeColorCellGrid[i][0]); } for (int i = 0; i < colorArray.length; i++) { - JPanel columnPane = new JPanel(new GridLayout(DEFAULT_DERIVE_COUNT - 1, 1, 0, 3)); + JPanel columnPane = new JPanel(new GridLayout(DEFAULT_DERIVE_COUNT - 1, 1, 0, 0)); for (int j = 1; j < DEFAULT_DERIVE_COUNT; j++) { columnPane.add(themeColorCellGrid[i][j]); } @@ -233,7 +235,7 @@ public class NewColorSelectPane extends BasicPane implements ColorSelectable { private void initMenuColorPane() { - menuColorPane.setLayout(new GridLayout(5, 8, 3, 3)); + menuColorPane.setLayout(new GridLayout(5, 8, DEFAULT_COLOR_HOR_INTERVAL, 0)); Color[] colorArray = this.getColorArray(); for (int i = 0; i < colorArray.length; i++) { Color color = colorArray[i] == null ? UsedColorPane.DEFAULT_COLOR : colorArray[i]; @@ -409,7 +411,7 @@ public class NewColorSelectPane extends BasicPane implements ColorSelectable { private void initialComponents() { int total = columns; JPanel panel = new JPanel(); - panel.setLayout(new GridLayout(1, columns + 1, 3, 3)); + panel.setLayout(new GridLayout(1, columns + 1, DEFAULT_COLOR_HOR_INTERVAL, 0)); panel.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); //最近使用颜色 Color[] colors = DesignerEnvManager.getEnvManager().getColorConfigManager().getColors();