From 0f8406f3c4442ec7b11f352163f5eefe4a0a9731 Mon Sep 17 00:00:00 2001 From: Harrison Date: Tue, 14 Jun 2022 16:13:03 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-73557=E3=80=90=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=99=A8=E7=8E=AF=E5=A2=83=E7=9B=91=E6=B5=8B=E3=80=91=E9=A2=84?= =?UTF-8?q?=E6=9C=9F=E5=A4=96=E7=9A=84=E5=90=AF=E5=8A=A8=E5=BC=B9=E7=AA=97?= =?UTF-8?q?=E4=BA=A4=E4=BA=92=E4=B8=8E=E8=AE=BE=E8=AE=A1=E7=A8=BF=E4=B8=8D?= =?UTF-8?q?=E4=B8=80=E8=87=B4=201=E3=80=81=E4=BF=AE=E6=94=B9=E4=B8=80?= =?UTF-8?q?=E4=B8=8B=E5=AD=97=E4=BD=93=E7=9A=84=E5=AE=9E=E7=8E=B0=EF=BC=8C?= =?UTF-8?q?=E4=B8=8D=E7=84=B6=E5=92=8C=E5=85=B6=E4=BB=96=E7=9A=84=E5=AD=97?= =?UTF-8?q?=E4=BD=93=E4=B8=8D=E7=BB=9F=E4=B8=80=E3=80=82=202=E3=80=81?= =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96=E4=B8=80=E4=B8=8B=20UI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/env/detect/ui/DetectorErrorDialog.java | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/designer-base/src/main/java/com/fr/env/detect/ui/DetectorErrorDialog.java b/designer-base/src/main/java/com/fr/env/detect/ui/DetectorErrorDialog.java index 43a2f00b9d..e636524c87 100644 --- a/designer-base/src/main/java/com/fr/env/detect/ui/DetectorErrorDialog.java +++ b/designer-base/src/main/java/com/fr/env/detect/ui/DetectorErrorDialog.java @@ -7,6 +7,7 @@ import com.fr.design.gui.ilable.UILabel; import com.fr.design.i18n.Toolkit; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.utils.ColorUtils; +import com.fr.design.utils.DesignUtils; import com.fr.design.utils.gui.GUICoreUtils; import com.fr.env.detect.base.DetectorUtil; import com.fr.env.detect.bean.DetectorResult; @@ -14,7 +15,6 @@ import com.fr.env.detect.bean.ExceptionSolution; import com.fr.env.detect.bean.ExceptionTips; import com.fr.env.detect.bean.Message; import com.fr.exit.DesignerExiter; -import com.fr.general.FRFont; import javax.swing.BorderFactory; import javax.swing.JDialog; @@ -39,13 +39,17 @@ import java.util.List; * created by Harrison on 2022/05/29 **/ public class DetectorErrorDialog extends JDialog implements ActionListener { - + + public static final float FONT_BOLD_HEIGHT = 16f; private UIButton okButton; private UIButton restartButton; public DetectorErrorDialog(Frame parent, List results) { super(parent, true); + + // 可能是还没初始化 UI 的时候出现的问题,初始化一下 UI + DesignUtils.initLookAndFeel(); JPanel northPane = FRGUIPaneFactory.createBorderLayout_L_Pane(); JPanel headerPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); @@ -57,8 +61,9 @@ public class DetectorErrorDialog extends JDialog implements ActionListener { JPanel messagePane = FRGUIPaneFactory.createVerticalFlowLayout_S_Pane(true); { UILabel boldHeader = new UILabel(Toolkit.i18nText("Fine-Design_Error_Start_Apology_Message")); - Font font = FRFont.getInstance(boldHeader.getFont().getFontName(), Font.PLAIN, 16); - boldHeader.setFont(font); + Font font = boldHeader.getFont(); + Font boldFont = font.deriveFont(FONT_BOLD_HEIGHT); + boldHeader.setFont(boldFont); messagePane.add(boldHeader); UILabel description = new UILabel(Toolkit.i18nText("Fine-Design_Send_Report_To_Us"));