From 15e6d0f197892e8e1997926d9ed0ee2f44961d0e Mon Sep 17 00:00:00 2001 From: kerry Date: Mon, 23 Aug 2021 14:56:30 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/style/color/NewColorSelectPane.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 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 a86a67365..435753964 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 @@ -170,11 +170,11 @@ public class NewColorSelectPane extends BasicPane implements ColorSelectable { boolean isDefaultColor = (i == 0 || i == 1); Color color = colorArray[i]; colorCellColumn[0] = createFineColorCell(color, isDefaultColor, i, 2); - colorCellColumn[2] = createFineColorCell(color = saturationDown(color, false, true), isDefaultColor, i, 1); - colorCellColumn[1] = createFineColorCell(saturationDown(color, false, true), isDefaultColor, i, 0); + colorCellColumn[2] = createFineColorCell(color = saturationDown(color, isDefaultColor, true), isDefaultColor, i, 1); + colorCellColumn[1] = createFineColorCell(saturationDown(color, isDefaultColor, true), isDefaultColor, i, 0); color = colorArray[i]; - colorCellColumn[3] = createFineColorCell(color = saturationDown(color, false, false), isDefaultColor, i, 3); - colorCellColumn[4] = createFineColorCell(saturationDown(color, false, false), isDefaultColor, i, 4); + colorCellColumn[3] = createFineColorCell(color = saturationDown(color, isDefaultColor, false), isDefaultColor, i, 3); + colorCellColumn[4] = createFineColorCell(saturationDown(color, isDefaultColor, false), isDefaultColor, i, 4); themeColorCellGrid[i] = colorCellColumn; } } From 2ce997a6b89871772c9bf3cc61d2a05c87cfbb62 Mon Sep 17 00:00:00 2001 From: kerry Date: Mon, 23 Aug 2021 15:24:22 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/gui/style/BorderPane.java | 8 +++++++- .../ColorBackgroundQuickPane.java | 20 +++++++++---------- 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/gui/style/BorderPane.java b/designer-base/src/main/java/com/fr/design/gui/style/BorderPane.java index 9f948e7a1..2e04b6ce5 100644 --- a/designer-base/src/main/java/com/fr/design/gui/style/BorderPane.java +++ b/designer-base/src/main/java/com/fr/design/gui/style/BorderPane.java @@ -95,8 +95,14 @@ public class BorderPane extends AbstractBasicStylePane implements GlobalNameObse borderPanel = new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Border"), 280, 24, panel); this.add(borderPanel, BorderLayout.NORTH); + UILabel backgroundFillLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Background_Fill")); + backgroundFillLabel.setPreferredSize(new Dimension(60, 20)); + backgroundPane = new BackgroundPane(); - backgroundPanel = new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Background"), 280, 24, backgroundPane); + JPanel backgroundContainPane = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{new Component[]{backgroundFillLabel, backgroundPane}}, + TableLayoutHelper.FILL_LASTCOLUMN, LayoutConstants.VGAP_SMALL, LayoutConstants.VGAP_MEDIUM); + + backgroundPanel = new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Background"), 280, 24, backgroundContainPane); this.add(backgroundPanel, BorderLayout.CENTER); initAllNames(); outerToggleButton.addChangeListener(outerToggleButtonChangeListener); diff --git a/designer-base/src/main/java/com/fr/design/mainframe/backgroundpane/ColorBackgroundQuickPane.java b/designer-base/src/main/java/com/fr/design/mainframe/backgroundpane/ColorBackgroundQuickPane.java index 8426a5b6d..2fbdb974e 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/backgroundpane/ColorBackgroundQuickPane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/backgroundpane/ColorBackgroundQuickPane.java @@ -3,9 +3,8 @@ package com.fr.design.mainframe.backgroundpane; import com.fr.base.background.ColorBackground; import com.fr.design.event.UIObserverListener; import com.fr.design.layout.FRGUIPaneFactory; -import com.fr.design.style.color.NewColorSelectPane; +import com.fr.design.style.color.NewColorSelectBox; import com.fr.general.Background; - import java.awt.BorderLayout; import java.awt.Color; @@ -15,13 +14,13 @@ import java.awt.Color; */ public class ColorBackgroundQuickPane extends BackgroundQuickPane { - private NewColorSelectPane detailColorSelectPane; + private NewColorSelectBox colorSelectBox; + public ColorBackgroundQuickPane() { this.setLayout(FRGUIPaneFactory.createBorderLayout()); - - detailColorSelectPane = new NewColorSelectPane(false); - this.add(detailColorSelectPane, BorderLayout.NORTH); + colorSelectBox = new NewColorSelectBox(100); + this.add(colorSelectBox, BorderLayout.NORTH); } public void populateBean(Background background) { @@ -34,12 +33,11 @@ public class ColorBackgroundQuickPane extends BackgroundQuickPane { } public void populateColor(Color color) { - this.detailColorSelectPane.setColor(color); + this.colorSelectBox.setSelectObject(color); } public Color updateColor() { - this.detailColorSelectPane.updateUsedColor(); - return this.detailColorSelectPane.getNotNoneColor(); + return this.colorSelectBox.getSelectObject(); } /** @@ -49,7 +47,7 @@ public class ColorBackgroundQuickPane extends BackgroundQuickPane { */ @Override public void registerChangeListener(final UIObserverListener listener) { - detailColorSelectPane.addChangeListener(new ChangeListenerImpl(listener)); + this.colorSelectBox.addSelectChangeListener(new ChangeListenerImpl(listener)); } @Override @@ -75,6 +73,6 @@ public class ColorBackgroundQuickPane extends BackgroundQuickPane { @Override public void reset() { - this.detailColorSelectPane.setColor(null); + this.colorSelectBox.setSelectObject(null); } } \ No newline at end of file