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); }