From 107b885bb620efd31afc477a2ca486702ae43f8d Mon Sep 17 00:00:00 2001 From: obo Date: Wed, 27 Dec 2023 18:41:52 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E4=B8=BA=E6=9E=9A=E4=B8=BE=E5=AE=9E?= =?UTF-8?q?=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/design/webattr/EditToolBar.java | 5 +++-- .../main/java/com/fr/design/webattr/FToolBar.java | 14 +++++++------- .../java/com/fr/design/webattr/ToolBarPane.java | 2 +- 3 files changed, 11 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 b5ffdae96d..56798e501a 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 @@ -30,6 +30,7 @@ import com.fr.design.utils.gui.GUICoreUtils; import com.fr.design.widget.IconDefinePane; import com.fr.form.ui.Button; import com.fr.form.ui.CustomToolBarButton; +import com.fr.form.ui.ToolBarButtonBgColorType; import com.fr.form.ui.Widget; import com.fr.form.ui.WidgetInfoConfig; import com.fr.general.Background; @@ -227,7 +228,7 @@ public class EditToolBar extends BasicPane { this.defaultCheckBox.setSelected(ftoolbar.isDefault() ? true : false); if (bgColorButtonGroup != null) { - this.bgColorButtonGroup.setSelectedIndex(ftoolbar.getButtonBgColor()); + this.bgColorButtonGroup.setSelectedIndex(ftoolbar.getButtonBgColorType().getCode()); } } @@ -263,7 +264,7 @@ public class EditToolBar extends BasicPane { ftoolBar.setBackground(this.background); } if (bgColorButtonGroup != null) { - ftoolBar.setBgColorLight(bgColorButtonGroup.getSelectedIndex()); + ftoolBar.setButtonBgColorType(ToolBarButtonBgColorType.getTypeByCode(bgColorButtonGroup.getSelectedIndex())); } return ftoolBar; } 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 a5aa6c2b10..a5202b2949 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 @@ -4,16 +4,16 @@ import java.util.ArrayList; import java.util.List; import com.fr.form.ui.ToolBar; +import com.fr.form.ui.ToolBarButtonBgColorType; 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 int buttonBgColor = WidgetThemeDisplayConstants.TOOLBAR_COLOR_AUTO; + private ToolBarButtonBgColorType buttonBgColorType = ToolBarButtonBgColorType.AUTO; public List getButtonlist() { return buttonlist; } @@ -54,12 +54,12 @@ public class FToolBar { this.isDefault = isDefault; } - public int getButtonBgColor() { - return buttonBgColor; + public ToolBarButtonBgColorType getButtonBgColorType() { + return buttonBgColorType; } - public void setBgColorLight(int buttonBgColor) { - this.buttonBgColor = buttonBgColor; + public void setButtonBgColorType(ToolBarButtonBgColorType buttonBgColorType) { + this.buttonBgColorType = buttonBgColorType; } public ToolBar getToolBar() { @@ -70,7 +70,7 @@ public class FToolBar { ToolBar toolBar = new ToolBar(n); toolBar.setBackground(this.background); toolBar.setDefault(this.isDefault); - toolBar.setButtonBgColor(this.buttonBgColor); + toolBar.setButtonBgColorType(this.buttonBgColorType); 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 12cdd345a4..8cfed87993 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.getButtonBgColor()); + this.getFToolBar().setButtonBgColorType(toolbar.getButtonBgColorType()); setPopulateFinished(true); }