Browse Source

REPORT-114524 【控件显示增强-复选按钮组控件】自定义,自定义修改控件背景后会报错

release/11.0
obo 9 months ago
parent
commit
1cd29b730b
  1. 6
      designer-form/src/main/java/com/fr/design/widgettheme/common/ButtonSettingPane.java

6
designer-form/src/main/java/com/fr/design/widgettheme/common/ButtonSettingPane.java

@ -3,9 +3,11 @@ package com.fr.design.widgettheme.common;
import com.fr.design.widgettheme.StyleSetting;
import com.fr.design.widgettheme.BaseStyleSettingPane;
import com.fr.form.ui.Widget;
import com.fr.util.ColorUtils;
import com.fr.widgettheme.theme.widget.theme.cell.ButtonTheme;
import org.jetbrains.annotations.Nullable;
import java.awt.Color;
import java.util.Arrays;
import java.util.List;
@ -64,6 +66,9 @@ public class ButtonSettingPane<T extends Widget> extends BaseStyleSettingPane<T>
} else {
styleSettingHead.setSelectedIndex(1);
colorSelectBox.setSelectObject(buttonTheme.getThemeColor());
Color widgetBgColor = buttonTheme.getWidgetBackground().getColor();
widgetBgColorSelectBox.setSelectObject(ColorUtils.ignoreColorAlpha(widgetBgColor));
widgetBgAlphaDragPane.populateBean(ColorUtils.roundColorAlphaDouble(widgetBgColor));
assignFontSizePane(buttonTheme);
}
switchCard();
@ -83,6 +88,7 @@ public class ButtonSettingPane<T extends Widget> extends BaseStyleSettingPane<T>
protected void updateButtonStyleBean(ButtonTheme buttonTheme) {
buttonTheme.setThemeColor(colorSelectBox.getSelectObject());
buttonTheme.setWidgetBackground(ColorUtils.createColorBackgroundWithAlpha(widgetBgColorSelectBox.getSelectObject(), widgetBgAlphaDragPane.updateBean()));
assignFontSizeStyle(buttonTheme);
switchCard();
}

Loading…
Cancel
Save