From e40ba91faffbe8790da8e3564e866c320e9715ce Mon Sep 17 00:00:00 2001 From: Starryi Date: Wed, 25 Aug 2021 18:34:08 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-58048=20=E3=80=90=E4=B8=BB=E9=A2=98?= =?UTF-8?q?=E5=88=87=E6=8D=A2=E3=80=91=E7=BB=86=E8=8A=82=E5=AE=9A=E5=88=B6?= =?UTF-8?q?-=E7=BB=84=E4=BB=B6=E6=A0=B7=E5=BC=8F-=E7=94=9F=E6=95=88?= =?UTF-8?q?=E8=8C=83=E5=9B=B4=E7=9A=84=E6=8F=90=E7=A4=BA=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E4=B8=8D=E5=85=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 【问题原因】 修改UILabel字体的设置方法 【改动思路】 同上 --- .../design/mainframe/theme/edit/ComponentStyleEditPane.java | 2 +- .../com/fr/design/mainframe/theme/edit/ui/LabelUtils.java | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/mainframe/theme/edit/ComponentStyleEditPane.java b/designer-base/src/main/java/com/fr/design/mainframe/theme/edit/ComponentStyleEditPane.java index 9a211ccb6c..e4182ea509 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/theme/edit/ComponentStyleEditPane.java +++ b/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); diff --git a/designer-base/src/main/java/com/fr/design/mainframe/theme/edit/ui/LabelUtils.java b/designer-base/src/main/java/com/fr/design/mainframe/theme/edit/ui/LabelUtils.java index 5d12f94985..2b099ed306 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/theme/edit/ui/LabelUtils.java +++ b/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; } }