From ddbf5f52b79077986cb5c99d1d7fd982585745df Mon Sep 17 00:00:00 2001 From: obo Date: Wed, 27 Dec 2023 16:35:50 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-111740=20=E3=80=90=E6=8E=A7=E4=BB=B6?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E5=A2=9E=E5=BC=BA=E3=80=91=E5=8E=86=E5=8F=B2?= =?UTF-8?q?=E6=A8=A1=E6=9D=BF=E5=8D=87=E7=BA=A7=E5=90=8E=EF=BC=8C=E5=B7=A5?= =?UTF-8?q?=E5=85=B7=E6=A0=8F=E6=B2=A1=E6=9C=89=E6=A0=B9=E6=8D=AE=E8=83=8C?= =?UTF-8?q?=E6=99=AF=E9=80=82=E9=85=8D=E6=B7=B1=E6=B5=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/design/webattr/EditToolBar.java | 8 +++++--- .../main/java/com/fr/design/webattr/FToolBar.java | 13 +++++++------ .../java/com/fr/design/webattr/ToolBarPane.java | 2 +- 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/design/webattr/EditToolBar.java b/designer-realize/src/main/java/com/fr/design/webattr/EditToolBar.java index 36222f19c9..b5ffdae96d 100644 --- a/designer-realize/src/main/java/com/fr/design/webattr/EditToolBar.java +++ b/designer-realize/src/main/java/com/fr/design/webattr/EditToolBar.java @@ -227,7 +227,7 @@ public class EditToolBar extends BasicPane { this.defaultCheckBox.setSelected(ftoolbar.isDefault() ? true : false); if (bgColorButtonGroup != null) { - this.bgColorButtonGroup.setSelectedIndex(ftoolbar.isBgColorLight() ? 0 : 1); + this.bgColorButtonGroup.setSelectedIndex(ftoolbar.getButtonBgColor()); } } @@ -263,7 +263,7 @@ public class EditToolBar extends BasicPane { ftoolBar.setBackground(this.background); } if (bgColorButtonGroup != null) { - ftoolBar.setBgColorLight(bgColorButtonGroup.getSelectedIndex() == 0); + ftoolBar.setBgColorLight(bgColorButtonGroup.getSelectedIndex()); } return ftoolBar; } @@ -729,7 +729,9 @@ public class EditToolBar extends BasicPane { private JPanel createButtonColorGroup() { UILabel headLabel = new UILabel(Toolkit.i18nText("Fine-Design_ToolBar_Button_Color")); - String[] titles = new String[]{Toolkit.i18nText("Fine-Design_ToolBar_Button_Color_Light"), Toolkit.i18nText("Fine-Design_ToolBar_Button_Color_Dark")}; + String[] titles = new String[]{ Toolkit.i18nText("Fine-Design_ToolBar_Button_Color_Auto"), + Toolkit.i18nText("Fine-Design_ToolBar_Button_Color_Light"), + Toolkit.i18nText("Fine-Design_ToolBar_Button_Color_Dark")}; bgColorButtonGroup = new UIButtonGroup(titles) { @Override public void setSelectedIndex(int newSelectedIndex, boolean fireChanged) { diff --git a/designer-realize/src/main/java/com/fr/design/webattr/FToolBar.java b/designer-realize/src/main/java/com/fr/design/webattr/FToolBar.java index df697b19ac..a5aa6c2b10 100644 --- a/designer-realize/src/main/java/com/fr/design/webattr/FToolBar.java +++ b/designer-realize/src/main/java/com/fr/design/webattr/FToolBar.java @@ -6,13 +6,14 @@ import java.util.List; import com.fr.form.ui.ToolBar; import com.fr.form.ui.Widget; import com.fr.general.Background; +import com.fr.widgettheme.theme.widget.theme.WidgetThemeDisplayConstants; public class FToolBar { private List buttonlist = new ArrayList(); private Background background = null; private boolean isDefault = true; - private boolean buttonBgColorLight = true; + private int buttonBgColor = WidgetThemeDisplayConstants.TOOLBAR_COLOR_AUTO; public List getButtonlist() { return buttonlist; } @@ -53,12 +54,12 @@ public class FToolBar { this.isDefault = isDefault; } - public boolean isBgColorLight() { - return buttonBgColorLight; + public int getButtonBgColor() { + return buttonBgColor; } - public void setBgColorLight(boolean bgColorLight) { - this.buttonBgColorLight = bgColorLight; + public void setBgColorLight(int buttonBgColor) { + this.buttonBgColor = buttonBgColor; } public ToolBar getToolBar() { @@ -69,7 +70,7 @@ public class FToolBar { ToolBar toolBar = new ToolBar(n); toolBar.setBackground(this.background); toolBar.setDefault(this.isDefault); - toolBar.setButtonBgColorLight(this.buttonBgColorLight); + toolBar.setButtonBgColor(this.buttonBgColor); return toolBar; } } \ No newline at end of file diff --git a/designer-realize/src/main/java/com/fr/design/webattr/ToolBarPane.java b/designer-realize/src/main/java/com/fr/design/webattr/ToolBarPane.java index 9e9d71f5e8..12cdd345a4 100644 --- a/designer-realize/src/main/java/com/fr/design/webattr/ToolBarPane.java +++ b/designer-realize/src/main/java/com/fr/design/webattr/ToolBarPane.java @@ -157,7 +157,7 @@ public class ToolBarPane extends BasicBeanPane { } this.getFToolBar().setBackground(toolbar.getBackground()); this.getFToolBar().setDefault(toolbar.isDefault()); - this.getFToolBar().setBgColorLight(toolbar.isButtonBgColorLight()); + this.getFToolBar().setBgColorLight(toolbar.getButtonBgColor()); setPopulateFinished(true); }