Browse Source

REPORT-111740 【控件显示增强】历史模板升级后,工具栏没有根据背景适配深浅

release/11.0
obo 11 months ago
parent
commit
ddbf5f52b7
  1. 8
      designer-realize/src/main/java/com/fr/design/webattr/EditToolBar.java
  2. 13
      designer-realize/src/main/java/com/fr/design/webattr/FToolBar.java
  3. 2
      designer-realize/src/main/java/com/fr/design/webattr/ToolBarPane.java

8
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<String>(titles) {
@Override
public void setSelectedIndex(int newSelectedIndex, boolean fireChanged) {

13
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<ToolBarButton> buttonlist = new ArrayList<ToolBarButton>();
private Background background = null;
private boolean isDefault = true;
private boolean buttonBgColorLight = true;
private int buttonBgColor = WidgetThemeDisplayConstants.TOOLBAR_COLOR_AUTO;
public List<ToolBarButton> 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;
}
}

2
designer-realize/src/main/java/com/fr/design/webattr/ToolBarPane.java

@ -157,7 +157,7 @@ public class ToolBarPane extends BasicBeanPane<ToolBar> {
}
this.getFToolBar().setBackground(toolbar.getBackground());
this.getFToolBar().setDefault(toolbar.isDefault());
this.getFToolBar().setBgColorLight(toolbar.isButtonBgColorLight());
this.getFToolBar().setBgColorLight(toolbar.getButtonBgColor());
setPopulateFinished(true);
}

Loading…
Cancel
Save