Browse Source

REPORT-58048 【主题切换】细节定制-组件样式-生效范围的提示显示不全

【问题原因】
修改UILabel字体的设置方法

【改动思路】
同上
research/11.0
Starryi 3 years ago
parent
commit
e40ba91faf
  1. 2
      designer-base/src/main/java/com/fr/design/mainframe/theme/edit/ComponentStyleEditPane.java
  2. 5
      designer-base/src/main/java/com/fr/design/mainframe/theme/edit/ui/LabelUtils.java

2
designer-base/src/main/java/com/fr/design/mainframe/theme/edit/ComponentStyleEditPane.java

@ -119,7 +119,7 @@ public class ComponentStyleEditPane extends JPanel {
JPanel tipLabelPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
tipLabelPane.setBorder(BorderFactory.createEmptyBorder(3, 0, 0, 0));
UILabel tipLabel = LabelUtils.createLabel(Toolkit.i18nText("Fine-Design_Template_Theme_Edit_Pane_Component_Style_Tip"), new Color(0XC6C6C6), 8);
UILabel tipLabel = LabelUtils.createLabel(Toolkit.i18nText("Fine-Design_Template_Theme_Edit_Pane_Component_Style_Tip"), new Color(0XC6C6C6), 10);
tipLabelPane.add(tipLabel);
container.add(tipLabelPane, BorderLayout.NORTH);

5
designer-base/src/main/java/com/fr/design/mainframe/theme/edit/ui/LabelUtils.java

@ -1,8 +1,10 @@
package com.fr.design.mainframe.theme.edit.ui;
import com.fr.design.gui.ilable.UILabel;
import com.fr.general.FRFont;
import java.awt.Color;
import java.awt.Font;
/**
* @author Starryi
@ -20,7 +22,8 @@ public class LabelUtils {
public static UILabel createLabel(String title, Color color, int size) {
UILabel uiLabel = new UILabel(title);
uiLabel.setForeground(color);
uiLabel.setFont(uiLabel.getFont().deriveFont(size));
Font newFont = FRFont.getInstance(uiLabel.getFont().getFontName(), Font.PLAIN, size);
uiLabel.setFont(newFont);
return uiLabel;
}
}

Loading…
Cancel
Save