Browse Source

REPORT-73557【设计器环境监测】预期外的启动弹窗交互与设计稿不一致

1、修改一下字体的实现,不然和其他的字体不统一。
2、初始化一下 UI
feature/x
Harrison 2 years ago
parent
commit
0f8406f3c4
  1. 11
      designer-base/src/main/java/com/fr/env/detect/ui/DetectorErrorDialog.java

11
designer-base/src/main/java/com/fr/env/detect/ui/DetectorErrorDialog.java vendored

@ -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;
@ -40,6 +40,7 @@ import java.util.List;
**/
public class DetectorErrorDialog extends JDialog implements ActionListener {
public static final float FONT_BOLD_HEIGHT = 16f;
private UIButton okButton;
private UIButton restartButton;
@ -47,6 +48,9 @@ public class DetectorErrorDialog extends JDialog implements ActionListener {
super(parent, true);
// 可能是还没初始化 UI 的时候出现的问题,初始化一下 UI
DesignUtils.initLookAndFeel();
JPanel northPane = FRGUIPaneFactory.createBorderLayout_L_Pane();
JPanel headerPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
headerPane.setLayout(new BorderLayout(15, 0));
@ -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"));

Loading…
Cancel
Save