Browse Source

Pull request #6083: REPORT-60266 主题配色编辑框样式修改

Merge in DESIGN/design from ~KERRY/design_10.0:feature/x to feature/x

* commit 'f5be3e61e9577acfbefce38d94fa9ed5e20f2e56':
  REPORT-60266 主题配色编辑框样式修改
research/11.0
kerry 3 years ago
parent
commit
00701c0b8c
  1. 22
      designer-base/src/main/java/com/fr/design/style/color/NewColorSelectPane.java

22
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();

Loading…
Cancel
Save