Browse Source

REPORT-55150 【组件背景分离】组件复用-标题设置下划线,选择下划线样式,目前web预览,不管选的什么下划线样式都显示的是单横线效果

【问题原因】
这是一个普遍存在的历史问题。临时性的解决方法是在组件样式设置面板中
隐藏下划线线型选择框,待后续全平台显示优化
【改动思路】
【review建议】
feature/10.0
Starryi 3 years ago
parent
commit
22b34d9bd8
  1. 31
      designer-form/src/main/java/com/fr/design/gui/xpane/LayoutStylePane.java

31
designer-form/src/main/java/com/fr/design/gui/xpane/LayoutStylePane.java

@ -81,7 +81,7 @@ public class LayoutStylePane extends BasicBeanPane<LayoutBorderStyle> {
private UIToggleButton titleFontBoldButton;
private UIToggleButton titleFontItalicButton;
private UIToggleButton titleFontUnderlineButton;
private LineComboBox titleFontUnderlineCombo;
// private LineComboBox titleFontUnderlineCombo; // 目前前端仅支持短横线类型的下划线,因此设计器端暂时就不展示线型选择框了,待后续优化
// 标题图文混排
protected TitleInsetImagePane titleInsetImagePane;
//对齐方式
@ -211,8 +211,8 @@ public class LayoutStylePane extends BasicBeanPane<LayoutBorderStyle> {
titleFontUnderlineButton.setGlobalName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_FRFont_Underline"));
titleFontUnderlineButton.setToolTipText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_FRFont_Underline"));
titleFontUnderlineCombo = new LineComboBox(UIConstants.BORDER_LINE_STYLE_ARRAY);
titleFontUnderlineCombo.setGlobalName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_FRFont_Line_Style"));
// titleFontUnderlineCombo = new LineComboBox(UIConstants.BORDER_LINE_STYLE_ARRAY);
// titleFontUnderlineCombo.setGlobalName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_FRFont_Line_Style"));
titleInsetImagePane = new TitleInsetImagePane();
@ -294,15 +294,15 @@ public class LayoutStylePane extends BasicBeanPane<LayoutBorderStyle> {
JPanel containerPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
containerPane.add(buttonPane, BorderLayout.NORTH);
containerPane.add(titleFontUnderlineCombo, BorderLayout.CENTER);
// containerPane.add(titleFontUnderlineCombo, BorderLayout.CENTER);
titleFontUnderlineCombo.setVisible(false);
titleFontUnderlineButton.addChangeListener(new ChangeListener() {
@Override
public void stateChanged(ChangeEvent e) {
titleFontUnderlineCombo.setVisible(titleFontUnderlineButton.isSelected());
}
});
// titleFontUnderlineCombo.setVisible(false);
// titleFontUnderlineButton.addChangeListener(new ChangeListener() {
// @Override
// public void stateChanged(ChangeEvent e) {
// titleFontUnderlineCombo.setVisible(titleFontUnderlineButton.isSelected());
// }
// });
return containerPane;
}
@ -349,7 +349,8 @@ public class LayoutStylePane extends BasicBeanPane<LayoutBorderStyle> {
frFont = frFont.applyName(titleFontFamilyComboBox.getSelectedItem().toString());
frFont = frFont.applyForeground(titleFontColorSelectPane.getColor());
frFont = updateTitleFontItalicBold(frFont);
int line = titleFontUnderlineButton.isSelected() ? this.titleFontUnderlineCombo.getSelectedLineStyle() : Constants.LINE_NONE;
// int line = titleFontUnderlineButton.isSelected() ? this.titleFontUnderlineCombo.getSelectedLineStyle() : Constants.LINE_NONE;
int line = titleFontUnderlineButton.isSelected() ? Constants.LINE_THIN : Constants.LINE_NONE;
frFont = frFont.applyUnderline(line);
title.setFrFont(frFont);
title.setPosition((Integer) titleAlignPane.getSelectedItem());
@ -425,11 +426,11 @@ public class LayoutStylePane extends BasicBeanPane<LayoutBorderStyle> {
int line = frFont.getUnderline();
if (line == Constants.LINE_NONE) {
titleFontUnderlineButton.setSelected(false);
titleFontUnderlineCombo.setVisible(false);
// titleFontUnderlineCombo.setVisible(false);
} else {
titleFontUnderlineButton.setSelected(true);
titleFontUnderlineCombo.setVisible(true);
this.titleFontUnderlineCombo.setSelectedLineStyle(line);
// titleFontUnderlineCombo.setVisible(true);
// this.titleFontUnderlineCombo.setSelectedLineStyle(line);
}
titleAlignPane.setSelectedItem(widgetTitle.getPosition());

Loading…
Cancel
Save